开发者

Why use JSP/Servlets?

I have done a lot of web development using PHP (both procedural and OO). I have in the last few years been involved in Java development (not JSP and Servlets) for embedded systems. I am pretty proficient using Java SE and have recently scored a nice web dev job. I am thinking of developing this site using JSP and Servlets but this is strictly for my own knowledge pro开发者_如何学Pythongression using Java. Is there any real reason to use JSP and Servlets over PHP or ASP etc?The problem being that a lot of Hosting companies do not offer e.g. Tomcat or other JSP servers and if they do, it's expensive.

Any feedback would be appreciated.

GF


I've been using JSP for years and the extensibility generally makes the nominal cost for monthly hosting more than worth it. That said, if you need to put up a basic informational or resume type of page, you're probably not going to need JBoss or some other sledgehammer.

With JSP/Java, it opens the door to using Java in the controller layer (you probably already used or have heard about advanced connection pooling, distributed caching, scheduling via Quartz, Hibernate object/relational persistence). And then you can run Java on any machine with a JVM. The syntax on JSPs isn't incredibly difficult, though it does have a learning curve. As far as hosting, eatj.com has been pretty good so far.

On the PHP side, you can easily incorporate community features like Wordpress. While you can use nWordPress for Java, it's just not the same thing. Facebook, probably one of the biggest implementations of PHP out there, uses HipHop and decreased their processor requirements dramatically.

Your project may also also have an easier time getting staffed with PHP developers since they are relatively more easy to come by than JSP developers. I'd say learn JSP and/or Ruby - it opens up a few more doors and you may eventually prefer one method over another.


If you've got the time, it's a good idea if only to learn the web aspects of Java. I'd suggest looking at a Java web framework such as Spring MVC, Wicket, or Struts, as they simplify development (after you learn them) and make web apps more testable and maintainable.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜