Webserver with Ajax and XML
|
|
![]() ![]() ![]() |
Webserver with Ajax and XML
| Fuxie - DK |
Jun 6 2006, 18:23
|
|
Group: Managers Posts: 4800 Joined: 21-January 03 From: Copenhagen, Denmark |
But then,what is there to test for us??
|
|
Post
#46
|
|
| Darklord |
Jun 6 2006, 18:31
|
|
Group: Members Posts: 80 Joined: 18-December 05 |
QUOTE(Fuxie - DK @ Jun 6 2006, 18:23) In particular in your case, two things:
This post has been edited by Darklord: Jun 6 2006, 18:34 |
|
Post
#47
|
|
| Fuxie - DK |
Jun 6 2006, 18:34
|
|
Group: Managers Posts: 4800 Joined: 21-January 03 From: Copenhagen, Denmark |
It's, from my PoV, next to impossible to compare preparation times, when you have split up the pages...
For us to test times, the XML-preparation should generate the same data as the links in XP (or Light) template... If it doesn't generate the same, it's like comparing apples and bananas.. |
|
Post
#48
|
|
| Darklord |
Jun 6 2006, 18:37
|
|
Group: Members Posts: 80 Joined: 18-December 05 |
QUOTE(Fuxie - DK @ Jun 6 2006, 18:34) It's, from my PoV, next to impossible to compare preparation times, when you have split up the pages... For us to test times, the XML-preparation should generate the same data as the links in XP (or Light) template... If it doesn't generate the same, it's like comparing apples and bananas.. True, to some extent, and im working on that (requests combined). However, the information sent will always be diferent, since the approaches ARE different, thats the point |
|
Post
#49
|
|
| Fuxie - DK |
Jun 6 2006, 18:52
|
|
Group: Managers Posts: 4800 Joined: 21-January 03 From: Copenhagen, Denmark |
First click on "Transfer" after login should be the same every time (not considering that data have changed a little), wether it's XML/Ajax or "old way"..
But if the XML-processing created everything that Transfer Page does ATM we have something to compare against, when talking about time.. |
|
Post
#50
|
|
| Darklord |
Jun 6 2006, 18:57
|
|
Group: Members Posts: 80 Joined: 18-December 05 |
QUOTE(Fuxie - DK @ Jun 6 2006, 18:52) First click on "Transfer" after login should be the same every time (not considering that data have changed a little), wether it's XML/Ajax or "old way".. Not necessarily, depends on the approach, if we go ajax all the way or not. I prefer not to, so i agree here. QUOTE(Fuxie - DK @ Jun 6 2006, 18:52) But if the XML-processing created everything that Transfer Page does ATM we have something to compare against, when talking about time.. It will, or at least i think so. Some things may need a diferent approach, though. |
|
Post
#51
|
|
| Fuxie - DK |
Jun 6 2006, 19:02
|
|
Group: Managers Posts: 4800 Joined: 21-January 03 From: Copenhagen, Denmark |
Ofcource, Ajax is all or nothing...
But in the conversion process, you'll have to make one thing/page at a time. And until we can click a link that creates a visual page that creates the same in Ajax and "old way", it's not possible to determine wether there is an improvement or not. |
|
Post
#52
|
|
| Darklord |
Jun 6 2006, 19:06
|
|
Group: Members Posts: 80 Joined: 18-December 05 |
QUOTE(Fuxie - DK @ Jun 6 2006, 19:02) Ofcource, Ajax is all or nothing... No, thats one of the biggest mistakes that may be (and are being) done. Both systems can and should coexist, thats one cardinal rule i learned in my studies of the tecnique. New tecniques are always abused, used even when shouldnt; but thats the way to advance in this field. This post has been edited by Darklord: Jun 6 2006, 19:10 |
|
Post
#53
|
|
| DonGato |
Jun 7 2006, 22:27
|
|
Group: Admins Posts: 5493 Joined: 21-January 03 From: The Pampas, The land of the Gaucho! |
Well, the style will be kept but the data will be managed with AJAX. You're heading to that Darklord?
|
|
Post
#54
|
|
| Darklord |
Jun 7 2006, 22:43
|
|
Group: Members Posts: 80 Joined: 18-December 05 |
For now, im just working on the updating part, and trying to avoid a lot of changes on the way it works already.
However, i foresee some problems, namely the tooltips; a request for update on each mouse over definitely isnt a good ideia, it may need some changes with that. After having a working solution, we may think of better ones. |
|
Post
#55
|
|
| DonGato |
Jun 8 2006, 05:37
|
|
Group: Admins Posts: 5493 Joined: 21-January 03 From: The Pampas, The land of the Gaucho! |
Well, some data we have from other parts of the code and we can reuse (but it might be complex as we construct the strings on the server side), and we can implement something like the GUI delay. Currently we show it immediately when mouse over and sometimes that is really disturbing.
|
|
Post
#56
|
|
| Aw3 |
Jun 8 2006, 11:14
|
|
Group: Admins Posts: 7319 Joined: 8-December 03 |
QUOTE(Darklord @ Jun 6 2006, 18:20) Yep, and that is also one of the strong points of the ajax way, since it doesnt reload the entire page, just the changing bits. How does the server know what to resend? Do you keep the copy of everything transferred to a client?QUOTE(Darklord @ Jun 6 2006, 19:06) New tecniques are always abused, used even when shouldnt; but thats the way to advance in this field. We are not commercial -- abusing here is not allowed |
|
Post
#57
|
|
| Darklord |
Jun 8 2006, 11:23
|
|
Group: Members Posts: 80 Joined: 18-December 05 |
QUOTE(Aw3 @ Jun 8 2006, 11:14) QUOTE(Darklord @ Jun 6 2006, 18:20) Yep, and that is also one of the strong points of the ajax way, since it doesnt reload the entire page, just the changing bits. How does the server know what to resend? Do you keep the copy of everything transferred to a client?It doesnt. Its up to the client to decide what and when to ask, and what to do with it once it arrives. Its a pull strategy instead of a push. There are techniques for the server to push info however, like an emergency of some sort. |
|
Post
#58
|
|
| Darklord |
Jun 8 2006, 21:42
|
|
Group: Members Posts: 80 Joined: 18-December 05 |
Im suprised noone has commented on this:
QUOTE(Darklord @ May 23 2006, 18:03) As the webserver as it was couldnt serve XML, i made the necessary changes (an ugly and imcomplete hack, the webserver needs serious refactoring); when done, it hit me with the new possibilities of this new interface: - possibility of any XML aware program being able to monitor and control emulePlus easily; this includes IM programs, IRC programs, scripts, whatever... I think this is a very useful feature. To give a better ideia, i implemented another prototype, this time a Yahoo Widget, that can monitor eMulePlus through the XML interface. You can get it here. It needs a new executable, that has the xml login implemented, which you can get here. Implementation Notes I needed another, webserver non-related, way to test the XML interface, to show issues with it that couldnt appear working only on the webserver. Like i refered on the first post, a lot of possibilities exist, but i wanted to try working on another cool thing; the widgets are promissing and popular, so i decided to try to build a widget that could do the same as the prototype for the webserver client. Got the documentation and gave it a quick study; the widgets are javascript and xml, so it was easy to get it. Looking through the widget gallery, i found an already existing widget, Emule Stats, that did all that i intended, only getting the info from the online sig (doesnt work with eMulePlus, because of diferences in location and format). I looked through the code (its a small widget), added and changed what was needed; even reused some of the code on the template One of the issues i talked about that i had already identified was the login, a way was needed to send the session id to the application, so that it could use it in the other requests; it isnt needed with the browser, as it already has one, but essencial for other applications. I refactored the code of the webserver, moving the login procedure out of the processUrl() method and into one of its own. Then i added the rest of the code, to implement a request for login in the xml channel. The request is this: CODE
Given the way that the webserver can process both GET and POST http methods in the same way, the above GET method works. However, its recomended that a POST is used in this case (as its implemented in the widget). The widget just uses the getStats request, same as the template as it is today. Widget instructions To use the widget, you need the Yahoo Widget Engine. After each launch, the preferences window appears; configure the webserver url and password fields correctly. After, it will try to connect to the webserver, if a problem with the connection occurs, an alert dialog box will appear. If such happens, you will need to restart the widget, as i didnt include a login button This is just a prototype to show the possibilities i talked about; later i intent to add more functionality as it is implemented in the webserver. |
|
Post
#59
|
|
| Aw3 |
Jun 8 2006, 23:45
|
|
Group: Admins Posts: 7319 Joined: 8-December 03 |
QUOTE(Darklord @ Jun 8 2006, 11:23) QUOTE(Aw3 @ Jun 8 2006, 11:14) QUOTE(Darklord @ Jun 6 2006, 18:20) Yep, and that is also one of the strong points of the ajax way, since it doesnt reload the entire page, just the changing bits. How does the server know what to resend? Do you keep the copy of everything transferred to a client?Its up to the client to decide what and when to ask, and what to do with it once it arrives. Its a pull strategy instead of a push. QUOTE(Darklord @ Jun 8 2006, 21:42) Im suprised noone has commented on this: Usually it works in the following way -- the more "useful" features you have, the less security you provide... QUOTE(Darklord @ May 23 2006, 18:03) As the webserver as it was couldnt serve XML, i made the necessary changes (an ugly and imcomplete hack, the webserver needs serious refactoring); when done, it hit me with the new possibilities of this new interface: I think this is a very useful feature. To give a better ideia, i implemented another prototype, this time a Yahoo Widget, that can monitor eMulePlus through the XML interface.- possibility of any XML aware program being able to monitor and control emulePlus easily; this includes IM programs, IRC programs, scripts, whatever... |
|
Post
#60
|
|
![]() ![]() ![]() |
| Lo-Fi Version | Time is now: 23rd May 2013 - 07:32 |