Jump to content

elGringo

uniGUI Subscriber
  • Posts

    434
  • Joined

  • Last visited

  • Days Won

    13

Everything posted by elGringo

  1. Andy, Zilav, Farshad thank you for your answers and opinions, so any technology has its limitations anyway. Just if you ask your friends do they use back button or not 9 of 10 will answer yes I think so. Of course for the moment I will tell users "Dont press back button or something bad will happen, but i think it is temporary decision" But anyway even if we have one page that is very powerful page)) Full of Delphi spirit and power. And in all other Aspects UniGUI is very clever and well done framework! Hope in future we will have pages anyway))) Regards and good luck to all!!!
  2. I feel decision must be, even if not at the moment, than I wish this feature to be in the future in UniGUI.
  3. So, no way to emulate pages with UniGUI? To use back and forward buttons? It is a habbit for many people to use this buttons, if we show another form to user and he wants to back to the previous form, pressing the button - he goes to another page - not UniGUI maybe, so did you meet such situations, how do you manage them?
  4. Hello guys! Tried to emulate opening a new page in the following way Click to go "another page" procedure TMainForm.UniButton1Click(Sender: TObject); begin UniSession.AddJS('window.location=''http://localhost:8077/?page=AnotherPage '' '); end; MainForm.OnShow procedure TMainForm.UniFormShow(Sender: TObject); begin if UniApplication.Parameters.Values['Page']='AnotherPage' then begin UnitAnotherPage.AnotherPage.Visible:=true; Self.Visible:=false; end; end; And everything good but! If in the browser to press BackButton UniGUI writes Invalid session or session Timeout. Restart application So any ideas? How to just back to the MainForm?
  5. So i think this should work Start Server - Create Process Stop Server - Terminate Process Restart Server - Terminate Process than Create Process
  6. Hi, everyone! I'm going to develop application mixed VCL and UniGUI with one database. VCL - is for administration and Server Management. UniGUI for Users Web accounts and main functionality of the programm. So Server will be as usual .EXE UniGUI file. The question is - is that possible to start / stop / restart it from VCL app? And other adjustments of Server - MaxConnections and so on? I see 2 ways Way 1 -Start through Create Process -Stop through Terminate Process Way2 Or to open UniGUI clent and to shoutdown it from Web - but I don't see such methods. Than if I shoutdown Server From Web - I will not be able to start it ))) Than only Way 1. Does anyone have experience with management of UniGUI Server??? Best Regards, Stanislav.
  7. rgreat thanks ! Tested more, for most apps after closing tab it waits about 5 sec. than updating data on the server - decreasing number of sessions,, but in 1 App, that uses AllowTerminate it didn't decreased Sessions number. Need to test more.
  8. Wow! Didn't know about that page! And what does mean Max Sessions and Max Requests on that page? It works very interesting - if to open tab with UniGUI App than to close it Current Sessions doesn't decrease, only increasing. If 1 user will open and Close tab for 1000 times than server will not load App to anyone - is it should be so or some mistake?
  9. I was testing AllowTerminate example and added 1 timer on the form to count the time, spent from the start. And for my surprise - if checked AllowTerminate as true or not - reaction was the same - Application was going to work and didn't terminated util manual terminate. Then I made conclusion - when Application do something - even if we move form, enabling timer, pressing buttons - any activity - then, it seems to me its communicating to the Server and session continues!!! Then if I understand correct - SessionTimeout begins from the moment of last Activity. Activity from client? Sessions - continues. Application continues to work. No Activity? SessionTimeout starts and Application will be terminated. I post it here because I didn't know that and maybe some new developers who didn't work with web, came from clear Delphi - will find it useful. I will try to assume experience of this topic (Post #12, Mohammed Nasman) What is Session (shortly)? Session - instance of Application with Unique ID on the server Session object, it's an object dictionary for each session instance, and it could be access within the application for the same (session id only). (Post #26, myself) How Session Model works? NoActivity from client Application (client went for coffebreak) - SessionTimeout Starts, if on ServerModule.SessionTimeOut was 20 minutes than after 20 minutes of NoActivity - Instance will be terminated and all data will be lost. So to save users data we can use MainModule.OnSessionTimeout AnyActivity? Application continues to work - SessionTimeOut countdown doesn't start (Post #18, #20, Oscar, myself) Oskar model -keep session alive (by "doing something" with server or maybe with AllowTerminate:=false; like above) -terminate session on Connection down to clean temporary files -to put "false" CloseApp button, and on click not to terminate, and real termination will be on closing browser tab -to keep transactions in one event My thoughts about it If we have <100 users than keeping session always alive - it is Ok. But in general case... Keeping session alive for all users may lead to big memory consumtion. So, lets take 32 bit Apps, 1 session, according to Mohhamed words - 10 MB. -If 1 user will open App only in 1 Tab than it is 10 MB of RAM, -if 100 users will open App in 1 tab than ~ 1 GB, after 100 users as i understand its unpredictable!!! -if 100 users will open App in 2 tabs than ~ 2 GB (will it work for 32 bit? Maybe. But OutOfMemory very possible), and for the Web it is normal to open different pages in many tabs - so here it could be problem for 32 bit. So if to project big Application with high Load and many, many users, 32bit App - not Ok, but 64 bit. (Post#25, Mohhamed) Mohhamed Model - To set SessionTimeout beetwen 30 min and one hour is very reasonable time - To not to keep Session Model always alive to save resources (RAM, Diskspace...) My thoughts about it -In general case it suites for <100 users and >100 users, so, seems to be universal. My Practical Conclusions -Set SessionTimeout in 45 min. -Save users data on SessionTimeout -Use 64 bit for >100 Users and in general case it gives more RAM resources
  10. Completely agree!!! 5 minutes, and some times 5 days for finding decision and you will never forget how did you do this. But nevertheless I post such "findings" to my blog - because after year sometimes it is faster to take a look on couple of strings that can help you! And also they can help to someone else! So, I think this topic can be closed!!! The answer is received. Thank you everyone for discussion!!!
  11. Completely agree!!! 5 minutes, and some times 5 days for finding decision and you will never forget how did you do this. But nevertheless I post such "findings" to my blog - because after year sometimes it is faster to take a look on couple of strings that can help you! And also they can help to someone else! So, I think this topic can be closed!!! The answer is received. Thank you everyone for discussion!!!
  12. Wow! That is very detailed answer, Oscar!!! So, if to assume your practice - best practice will be -keep session alive (by "doing something" with server or maybe with AllowTerminate:=false; like above) -terminate session on Connection down to clean temporary files -to put "false" CloseApp button, and on click not to terminate, and real termination will be on closing browser tab -to keep transactions in one event Good advices for the beginners!!! Thank you!!!
  13. Oscar, Mohhamed, Delphidude, Farshad, skepsis, and how do you think - what is normal practice for SessionTimeout Management in real Application? I tested simple Application for 15 hours with this code above and it was working. Server responded the answer. In real Application - how is it better to manage SessionTimeout - to set it to 24 hours for example? -or to set it endless how in the example above? Because on the one hand it's not good when Application Terminated when user is working. On another hand as I understood when user close the tab application terminated automatically. Then endless Session seems to be the best variant?
  14. Yes! I just found it after I asked question here, go leraning)) Anyway thank you!
  15. I agree, my example is for both 1&2))) Just if it would be any other variable than it will not exist after we will destroy the instance, as I understand. Ok theme is almost clear for me - thank you Mohhamed and All for attention!!! Other details in experiments and practice!
  16. Mohhamed! Thank you for such detailed answer!!! Before asking that - I also thought that its some copy / instance of the programm but I have read some topics of "What is session" for different technologies, like PHP, and decided to ask here. So, session is instance - clear for me, thank you. As for the second point - if i understand correct - lets take real example from Demos C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\SessionTimeout We declare in MainModule variable AllowTerminate : Boolean; and call it in Main procedure TMainForm.UniCheckBox1Click(Sender: TObject); begin UniMainModule.AllowTerminate:=UniCheckBox1.Checked; end; Is that good example for your 2 point? And in other instance there will be another variable AllowTerminate - if I understand you correct? And if I want to share some variable beetwen sessions - if I understand correct - I should keep it on the ServerModule?
  17. UniFriends! How do you create Reports? FastReport or special jQuery plugins? What is the best technique if, for example, i have database application, and i want to report some results from there? I see 2 techniques -through the FastReport - to create on the Server pdf file, for example and link user to it from browser SomeServerPath/Report.pdf -to use some special jQuery plugins. or we don't need any Reports and just can call Print function of the webbrowser? What will be a most simple and effective technique? Thank you in advance!
  18. Thank you! DelphiDude!!! You must me a genious))) I mean you don't need documentation. But I see the sense in your words - a lot of things are the same like in Delphi and it helps.
  19. Thank you for the answer. I think you are right about experiments! In generall i understand but details... ...only in practice!!!
  20. So, when session is active (not termiated) i can communicate with Server. Send or Recieve files, variables, streams, constants and so on?
  21. Hello, guys, professionals! I don't have a lot experience in web development, so I want to ask simple questions! -What is Session in UniGI? Is that some file on the server like in PHP ? Or is that copy of programm, started on the Server? -How to Use it? Basic, popular examples of using it? I know one - to Add JS UniSession.AddJS('alert(''This is message from JS '')'); Could you explain basic things about session?
  22. Question was very simple, sorry for interruption. Just i didn't work with 64 bit applications before. Thank you Oliver and all.
  23. Hello, everyone! I've read docs of Farshad for Stress Tool about 32 / 64 bit Applications quote from docs: ... While 32-bit application can consume up to 2 GB of RAM in theory, in practice any value above 1.0-1.1 GB means that you are in danger zone. That happens because memory used by uniGUI app is very fragmented and for other reasons Delphi's memory manager can not occupy 2 GB of RAM for an 32-bit uniGUI server. When your app runs out of memory it will start logging "Out of Memory" message and user will also see this message when a new session is started. This is a serious situation and may produce unpredictable results which will eventually lead to a server crash. If you are concerned with memory usage and your app will use more than 1GB of RAM it is better to target your server for 64-bit platform. In a 64-bit server it is very unlikely to get an "Out of Memory" error because even when physical RAM is consumed Windows will switch to virtual memory which is limited by swap space available on your hard drive. So in a 64-bit server you can consume memory much larger than the available physical memory. ... So its unclear for me how to use our application with 64 bit systems properly As I understand if we use StandAlone server, than it is 32 bit anyway. And if we will use it on 64 bit Windows for example with 16 GB of memory for example we will not see any advantages (more than 4 GB of RAM). If we use dll, so it is library, used by IIS for example. And how it works here not very clear.If IIS itself 64 bit than our application is 64 bit or not ? Please answer who faced with that. Thank you in advance!!!
×
×
  • Create New...