Jump to content

Unigui beginner questions


elGringo

Recommended Posts

Dear all. I'm a beginner in Delphi UniGui programming. I was coding on Delphi for win32 before. Looking for advice. 

Using trial 0.99 version i could start demos typing http://localhost:8077/ on my Google Chrome

 

I also could create my standalone applications too, but it seems to me i don't know basics about web programming for the moment.

 

For example i don't know how to

 

-open new tabs in browser using unigui with applications inside

 

-Back/Forward buttons in the browser? If push them application terminating?

 

I have feeling that it is need to learn basics about web, languages like PHP / Java script to understand, such basics.

 

So i'm looking for advice in which direction to develop my knowledge about crating web applications using Unigui?

 

-learn web languages and then back to unigui?

-learn demos of unigui?

-maybe read some special books?

-other?

 

If such basics could be in Help of UniGui for those ones who only begin programming on the web it would be great!

 

Link to comment
Share on other sites

Ok, i didn't know basic things like open in new tab, reload and so on, for beginners like me i 'll put the message

all i was doing - just looking in google

 

//Go another page

procedure TMainForm.UniButton1Click(Sender: TObject);

begin
  UniSession.AddJS('location.href=''http://google.com');
end;
 
//Go another page in new tab
procedure TMainForm.UniButton2Click(Sender: TObject);
begin
 UniSession.AddJS(' window.open(''http://google.com')');
end;
 
//Reload page
procedure TMainForm.UniButton3Click(Sender: TObject);
begin
UniSession.AddJS('location.reload(true)');
end;

 

As far as i understand the process we can put 2 or more dll's on IIS and surf them this way, but as far as i understand application in uni gui terminating when we go to another page like this

 

UniSession.AddJS('location.href=''http://google.com');

 

Continue learning and experimenting...

 

 

 

  • Upvote 2
Link to comment
Share on other sites

  • 2 weeks later...

Hi Gringo,

 

Like you I came to UniGUI via years as a Win32 programmer. I knew SQL but nothing about any web development languages. I realised that Win32 programming alone was dead and that I had to move my skills online. Tried Delphi Prism, C#, Delphi IntraWeb and got to the point of seriously considering giving it all up. IntraWeb had some promise but struck me as an unfinished product that could disappear at any time. 

 

I came across UniGUI by chance a couple of years ago. My advice to you is to stick with it and run the demos. Take them apart, try small changes and see what happens. FMSoft have built a truly great framework; now I have a major system built in Delphi XE3 + UniGUI running on a dedicated server for a big client and it rocks!. Test system runs on a small virtual server with only 1Gb RAM .It's a single DLL running under IIS 7.5. To be honest, going from scratch to running speed with IIS is a nightmare. Took me about a month of shouting and swearing at Microsoft to get it working. This link helps:

 

http://chee-yang.blogspot.co.uk/2009/10/configure-windows-7-iis7-for-isapi-dll.html

 

I still don't know much about Javascript or any other web stuff. 99% of my code is Delphi plus the odd bit of javascript that I've found online or on this forum.

 

As you get to know UniGUI you'll come across things that are different to win32 programming. Dialogs, Modal Windows, Callbacks etc. These can be frustrating but once you get your head round them you'll be fine.  You'll do things wrong and break things but you'll learn. You'll find out the subtle differences with different browsers. You'll learn about sessions and resources and error handling.

 

Re your original post: my advice is to use the demos. Don't bother to learn anything else, you can survive without JavaScript or can steal/beg/borrow if needed.

 

You also said "Back/Forward buttons in the browser? If push them application terminating": Back/Forward buttons don't work with UniGUI. Someone who knows more about stateful/stateless stuff can tell you exactly why but all you've got to know is that they don't work and accept that. Go to UniMainModule and set property BackButtonAction to bbWarnUser. I got round this with my clients by saying that what they were getting was a Web App and not a Website. Make out that back/forward buttons are yesterday's technology.

 

There's no doubt that UniGUI has given my career (self-employed programmer since 1991) a new lease of life. You should stick with it and ask for help on this forum when you get stuck. 

 

Good luck

 

Andy.

Link to comment
Share on other sites

Hi,

 

I agree that it is smart to check out the demos. Some times it may not be obvious

how the demo is working, but by searching (also in ExtEvents property) you will

eventually understand what happens. I myself could get a little frustrated due to lack of

information on the various demo issues, but this only makes you search and get to

know the various details of the framework faster, I suspect.

 

It is a paradigm shift to go to client-server processing, if you have not been there 

before in some respects. Of course it helps to know about internet technology in

general, and Javascript, HTML, CSS, JSON etc. I do not see much point in learning

PHP really, but of course it's "nice" to know the basics of anything in the field.

 

You can do a lot with Unigui without knowing much Javascript, and I suggest starting

there first, and then when you feel comfortable, start experimenting with JS and

ExtEvents. Like with all tools, there is a learning curve, but compared to lots of

other framworks, I assume Unigui should not be too hard for most people.

 

As you get the hang of it, you will discover that you can create webapps faster

than you ever thought was physically possible....and then the fun starts :)

 

Another tip: if you get stuck on a single issue, try to move on to another,

and rather get back to it later. Don't worry, as almost anything can be solved,

usually in a pretty simple way somehow.

  • Upvote 1
Link to comment
Share on other sites

  • 2 months later...

Guys! I have read it just now!!! Thank you very much for the help and those words above!!!

 

For the moment trying to create application with UniGui.

 

Demos are really helpful and what is good forum is alive and someone is also helps - that really great!

 

For example right now I asked the question about picture uploading to the server and writing it as <img...> and Delphi Developer helped me, by writing the code.

 

But what is really unsufficient - is some guide like "First steps in UniGui", someone on that forum suggested to create something like that on Wiki, but that is in the process for the moment as i understand. Video lessons and so on...  also could help,

 

More structured information - more clients of uniGui. Faster development of that shiny project!

Link to comment
Share on other sites

  • Administrators

But what is really unsufficient - is some guide like "First steps in UniGui", someone on that forum suggested to create something like that on Wiki, but that is in the process for the moment as i understand. Video lessons and so on...  also could help,

 

More structured information - more clients of uniGui. Faster development of that shiny project!

 

 

I am fully aware of this shortage. Documents are being prepared and first version will be published soon.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...