What Java library or dll can be used to develop a WEB GUI in Xbase++?

Xbase++ 2.0 Build 554 or later
Message
Author
Diego Euri Almanzar
Posts: 174
Joined: Thu Nov 05, 2020 10:51 am
Location: DOMINICAN REPUBLIC

Re: What Java library or dll can be used to develop a WEB GUI in Xbase++?

#51 Post by Diego Euri Almanzar »

I was wrong, Xbase++ CXP is awesome, robust, great for web development.

I admit I'm afraid of, and not good at, hardware configurations, programs, or operating systems. Maybe that's why I never knew how to configure Xbase++ WAA. Not being able to configure WAA, 7 years ago, was frustrating. Then I bought version 2.0 of Alaska, and I couldn't set up CXP either. I even thought that CXP also depended on Apache, like WAA depends on it. From my point of view, configuring Apache is another terrible thing, very difficult. Due to these shortcomings of mine, I preferred to look for a Web framework for Xbase, to avoid my little knowledge of HTML and Web server configurations. 2 months ago, after 3 years of searching, I got a Web Framework. I wanted to share the idea this way, and was told that the Framework's views were deprecated, and it seemed you couldn't use modern CSS like Bootstrap. Anyway, for all the good suggestions I've been given in this forum, I made a point of learning HTML, and I made a point of learning how to install CXP, and its robust technology.
The first hurdle I encountered in my choice for CXP, is that every time I tried to build CXP projects, cxc-build would not run, and an error would appear stating that the INETPUB and WWWROOT folders were missing.

The only way to get around that hurdle is to uninstall Alaska Xbase++, then install IIS and Windows CGI, and finally re-install Alaska Xbase++. That is, IIS and CGI must be installed before Alaska Xbase++ is installed.

After solving this, I was able to run the CXP examples, inside the WWWROOT folder, via Workbench. In order to be able to execute a CXP outside of Workbench, it is necessary to develop a small program that serves as a Web server, through the HttpEndpoint() instruction, thus avoiding the use of Apache.
The impressive thing is that in a CXP source program, you can include HTML, JSON, Java, Xbase++, CSS, and perhaps other nomenclatures. Then CXC-BUILDER turns all of that into a DLL, or multiple DLLs. And, I suppose, this is an advantage in two aspects: speed in the views that are sent to the browser, and security to avoid the problems of hackers on the Web.

I have already developed examples using Bootstrap and other modern technologies, which you have recommended to me.

I was at the point of wasting the highest technology. But, thanks to you, I have reconsidered.

Best regards.

User avatar
rdonnay
Site Admin
Posts: 4774
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: What Java library or dll can be used to develop a WEB GUI in Xbase++?

#52 Post by rdonnay »

I had to go thru all the same frustrations as you when working with CXP, but somehow I was a believer in the idea so I persevered.

I went even further, and created my own CXP server in Xbase++, thereby eliminating the need for IIS or Apache.

You will find that in \exp20\samples\web20\cxphttpserver.prg.
The eXpress train is coming - and it has more cars.

Diego Euri Almanzar
Posts: 174
Joined: Thu Nov 05, 2020 10:51 am
Location: DOMINICAN REPUBLIC

Re: What Java library or dll can be used to develop a WEB GUI in Xbase++?

#53 Post by Diego Euri Almanzar »

Hello Roger.

I'm always digging into each of your examples, and xphttpsserver.prg seems super interesting to me, I'll study it right away.

Everything I have achieved is with your help, thank you very much.

User avatar
SlavkoDam
Posts: 111
Joined: Wed Apr 27, 2022 10:12 am
Location: Negotin, Serbia
Contact:

Re: What Java library or dll can be used to develop a WEB GUI in Xbase++?

#54 Post by SlavkoDam »

Hi Diego,
It is great that you succeeded to use CXP after many years of trying, I am glad for you and congratulate. Yes, CXP is great since it implements the modern MVC web technology, like many other programming languages. I first learned and used MVC in C# and its the same in Xbase++ CXP. Alaska incorporated it in Xbase++ very good.

Considering the speed of executing CXP/WAA pages, its the same situation. Web pages from your application are sent to external web server, and he sends them to web browser, there are two rounds. But, with PowerComHttp server, web pages are sent directly to web browser, there is one round. Boris Bersic described that very nice on this link: https://www.xb2.net/xb2net/DataFlow.htm. His xbHTTPServer executes the same way as PowerComHttp server.

Regarding your note about PowerWeb: "it seemed you couldn't use modern CSS like Bootstrap", I must say that its not true. PowerWeb is opened for using any other web technology, like with CXP/WAA. You only have to cite scripts you want to use. But, it seems that you have a similar situation as with CXP some years ago. You are missing or doing something wrong, I hope you will solve that as you did with CXP.
Best regards,

Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs

Diego Euri Almanzar
Posts: 174
Joined: Thu Nov 05, 2020 10:51 am
Location: DOMINICAN REPUBLIC

Re: What Java library or dll can be used to develop a WEB GUI in Xbase++?

#55 Post by Diego Euri Almanzar »

Dear Slavoljub Damnjanovic,

regarding programming I have three essential problems:

- I don't know anything about the Web. What little I know about the Web, I have learned in this forum, and with you. Therefore, I am very grateful to you.

- Regarding programming, I like easy things. I prefer to invest in purchases of frameworks. That's why I didn't learn Xbase++ objects, I prefer the Express library.

- I don't like to configure Hardware.

They are mistakes that close many doors for me, but nobody is perfect.

I found the CXP issue very dramatic, very closed, very problematic. But, I was forced to learn CXP, defined as follows: I sent you by email, the HTML source program, from a small menu, accordion type, and you told me to read the HTML with memoread(), because your library did not accept other CSS. If you want, I can send you the answer you gave me. The members of this forum have criticized the use of memoread() a lot, claiming that it is an obsolete technology, since it does not allow AJAX technology. So, it scared me so much, that I started searching deep in my brain, what little bit of intelligence I have left, and finally I learned how to use CXP, and I learned how to write HTML, and a little bit of JAVASCRIPT. Apparently, the scares are taken advantage of.

Already made some source programs with CXP, combined with the Express library, METROUI, and Bootstrap. I already integrated the DCPRINT ON of the Express library. This allows me to migrate all my reports, and tickets, with the same design to the web. If anyone wants the source program for this, I can attach it here. As well, I am willing to help anyone who wants to venture into CXP technology.

Obviously, I will never rule out the use of your excellent POWERWEB library. But in the meantime, I'm focused on rendering the PDFs I produce in the CXPs in the browser, with DCPRINT. I do not understand how a line as versatile as POWERWEB, they do not have any type of impression. Business apps, or APPS, are not apps if you can't print an invoice or any other document. Hopefully you can help me print a PDF through the POWERWEB library, or through any other tool.

Best regards.

User avatar
SlavkoDam
Posts: 111
Joined: Wed Apr 27, 2022 10:12 am
Location: Negotin, Serbia
Contact:

Re: What Java library or dll can be used to develop a WEB GUI in Xbase++?

#56 Post by SlavkoDam »

Hi Diego,

I don't understand why you are told that memoread() is obsolete. And what matter does it has with AJAX technology? None, they are not related at all. Also, in all their XbpWebUI examples, Alaska uses memoread(), you can check that. Besides, you can use fread() to get file content.

I think the best is to follow your own experience and intelligence, and not to relay always on other claims, and not to be scared or ashamed of what are you doing. Try, and if it works it is it.

I am also criticized about the PowerWeb design and look, as being obsolete. I am not ashamed of what I have created, but very proud of that. I still think that PowerWeb library is very comfortable and easy to use in Xbase++ style. And if anybody knows any other web app development library, written in pure Xbase++ code, I would like him/her to share that information. Its easy to criticize something you have never tried or done personally.
Best regards,

Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs

Diego Euri Almanzar
Posts: 174
Joined: Thu Nov 05, 2020 10:51 am
Location: DOMINICAN REPUBLIC

Re: What Java library or dll can be used to develop a WEB GUI in Xbase++?

#57 Post by Diego Euri Almanzar »

Dear Slavoljub Damnjanovic,

you're right But, for one reason or another, I am already involved in CXP. And, I find it as easy as working in XBase. Each CXP file is equivalent to HTML, which is what is sent to the browser, and can be enriched or improved by adding Xbase code. Also, the business logic that I had developed in my desktop application, I use in DLL documents. I wasted a lot of time, but now I understand everything better, I did my tests, and everything is going well for me. Obviously, after I finish some screen formatting, and my project is more advanced, I'll include your library. That is, I have never ruled out the use of your library. I am even using Express for many things, since a CXP project allows you to use everything that is used in a normal Xbase++ project.

What I need most now is to upload a PDF to the browser, display it in the browser. Browsers block PDF views if they are not included in a URL. I would like to know how to create a local URL, to be able to show in the browser, the PDFs that I have created successfully, with the EXpress library. Hopefully you can in that, through your library. Maybe your library has some option to display a PDF in the browser.

Thanks.

User avatar
unixkd
Posts: 575
Joined: Thu Feb 11, 2010 1:39 pm

Re: What Java library or dll can be used to develop a WEB GUI in Xbase++?

#58 Post by unixkd »

What I need most now is to upload a PDF to the browser, display it in the browser. Browsers block PDF views if they are not included in a URL. I would like to know how to create a local URL, to be able to show in the browser, the PDFs that I have created successfully, with the EXpress library. Hopefully you can in that, through your library. Maybe your library has some option to display a PDF in the browser.
Have you be to upload a PDF to the browser, display it in the browser. Browsers block PDF views if they are not included in a URL?

It will be nice to share your exprience

Joe

User avatar
SlavkoDam
Posts: 111
Joined: Wed Apr 27, 2022 10:12 am
Location: Negotin, Serbia
Contact:

Re: What Java library or dll can be used to develop a WEB GUI in Xbase++?

#59 Post by SlavkoDam »

Hello,
PDFs can be freely displayed in a web browser without problems. Both with local and web URL. There is no browser blocking. It works in CXP and WAA too without problems.
Best regards,

Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs

Diego Euri Almanzar
Posts: 174
Joined: Thu Nov 05, 2020 10:51 am
Location: DOMINICAN REPUBLIC

Re: What Java library or dll can be used to develop a WEB GUI in Xbase++?

#60 Post by Diego Euri Almanzar »

Dear SlavkoDam,

I know that it is very easy for you to create a local URL, to be able to upload a PDF. However, you didn't want to give me an example of how to do it. I suppose that through IIS, I can create a shared folder, to host the PDF documents that I want to show on my WEb system, but I haven't been able to do it. It's the only thing I'm missing. Everything else works very well with CXP.
I hope you can help me some day.

Best regards

Post Reply