ExtJs - server side?
we've got a request from the customer to build web application based on ExtJS framework. I looked over the internet and find out that ExtJs is just a client javascript controls but I assume that web application must have serverside as well - at least for DataBase storage...
Am I right? or on the server could be just a DB and with ExtJs I can make direct requests to the server DB? even if so - what about security... If not - what is better to take as server part? - Tomcat and JSP?
(before that i'got experience only with ASP.Net so java in web is completely开发者_运维知识库 new for me...)
thx
Ext JS is a client side library.
While it would be possible to run it server side (you can run javascript server side) doing this makes absolutely no sense whatsoever (it won't translate into the client side functionality your client is looking for).
If the client requires you to use Ext JS, they mean they want it on the client side.
You should ask the client if they have any server side requirements. If not, use whatever you like. If you have experience with ASP.NET I would recommend ASP.NET MVC (what StackOverflow is built with)
Since your GUI will be composed of HTML pages containing rich ExtJS components offering a JavaScript API, I would opt for an MVC framework (not a component-based one) which easily allows to
- generate HTML pages
- read and generate JSON in order to communicate between the JavaScript components and the server-side.
- talk to a database
Most of the Java MVC frameworks qualify (Stripes, Spring MVC, Struts, etc.).
But remember : do not put Java code in your JSPs. Use Java actions of your framework for that. JSP should be used only for the HTML generation part.
You need a backend to send requst to, which then connect to a database. Ruby on Rails, PHP, ASP, JAVA, whatever you want, as long as it can run on you server. ExtJS will only provide the front end widgets and front end connections, but the request must be run by the backend.
Making direct request to the db would not be a good idea especially with customers which can do request like this. Always use at least PreparedStatements. At work we use http://www.mybatis.org/ and are perfectly happy with it.
精彩评论