Hi all,
I'm fairly new to Echo framework, i've studied the code for the Echo3 demo website and i'm very impressed with the effects that Echo3 framework can do. Thanks a million to the developer for making this framework open-source :D.
I'm trying to write a web application for my school with the need to access database, I knew that using server side scripting i could use JDBC to access to MySQL database. But however, due to performance consideration, i will be using Client Side scripting to write my web application.
I've tried to search the forum but there is no examples on accessing database using client side scripting.
Can any1 assist me in giving me some examples coding on how can a client side javascript application access to a database?
Thanks alot for your kind help.
Regards,
Chee Han
Alternatively, should i use
Alternatively, should i use server side scripting to program my web application?
It will be used by roughly 50+ people and in the future it may grow even more, and my whole school of 10k population may be using this application.
So performance on the server side is a big consideration, is there any recommendation?
Thanks for answering my question as i'm very new to web application.
Regards,
Chee Han
There are no simple answers
There are no simple answers to questions like this. People spend years / decades becoming professionals in this area.
You need to search the web for tutorials on how to write server-side applications.
For security, your client side should make remote procedure calls to the server side to do work for it. Do not send SQL from the client to the server, as this is a *huge* security hole.
My first suggestion would be to write your application client-side as you suggested, but to use a framework such as DWR to make remote procedure calls to business logic residing on the server.
I can only second
I can only second this:
Since you will already have to write some serverside code, why not write the complete app serverside ?
So you won't have to mix up different technologies, debug in two places etc.
Thanks for the reply The
Thanks for the reply
The reason that i don't write the whole application server side is i afraid it may burden the server as its only 1 server at the moment.
Even in the future i may not get enough application server to share the burden, that's is why i'm thinking of writing it client side.
I've done some google and i found that i can use AJAX to get the data via database.
Let me do some further research and thanks for helping a newcomer like me :D.
Regards,
Chee Han
P/S: sorry for my bad English as it is not my first language. ><
I would love to hear Tod's
I would love to hear Tod's official comment on this, but I think you're doing something called "premature optimization" when you're concerned about the performance of using server-side Echo. On top of that, I'm not sure that there really is a performance issue to be concerned about... Even with one server, the server-side application I have made for my work environment handles 20+ clients without issue, and I imagine there are others on here who have applications hosted on one server serving more than that. In other words, server-side Echo applications do not perform poorly (nor does the Java runtime in which they run).