web application in java, .net, php or rails? - java

Our current web has been a rails application for 4+ years now. It is current in version 2.3.8. Our MySQL database and data manipulation for presentation is extensive. We are about to undertake development of a companion site and are evaluating whether we should do that in rails, java, .net or php. Here are some of the factors we are considering.
RAILS
Development Environment: Our machines are pcs with Windows os. We have run into Windows-centric difficulties (too numerous to detail here), most of which we solved. We want to spend more time on code, less on windows/rails compatibility issues. We could switch to Linux or PearPC. Would that cut down on some of those issues, or just result in a new set? Long term... we could replace our pcs with macs.
Development Process: It seems like keeping up with rails architecture is like chasing a swiftly moving target. I'm sure that there are many of you out there that are perhaps a little more nimble :=] but we could use a tad more stability. Anyway, the more you fall behind the most current versions the more difficult it is to find help. One advantage is that we could copy and paste some of our existing code to the new site.
End Users: Attractive and easy to use application for pc or mac.
PHP
Development Environment: Works well on PC with Windows
Development Process: I don't know enough to evaluate here. One advantage is that the consultant who advises us regarding our training and education processes recommended Moodle which is written in php. A disadvantage is the need to learn php.
End Users: I don't know enough to evaluate here although i have seen numerous php sites that are attractive and seem easy to use.
JAVA
Development Environment: Great in pc/windows
Development Process: A disadvantage is the need to learn java.
End Users: Don't know enough yet.
.NET
Development Environment: great in pc/windows :=] Resource downloads were a little problematic.
Development Process: A disadvantage is the need to learn .net. We would probably go with MVC or C#.
End Users: obstacles for mac users?
Thank you Stackoverflow community!
EDIT: on one of our machines i did an ubuntu install. On configuring rails i ran into the same show stopper that plagued us with windows. one of our pc/windows machines is running fine for development. i have picked and picked apart that install versus the other machines and cannot find the source of the problem. i believe that rails is great... for some other team. we need a development environment that might not have all the advantages of rails, but is stable. i am not interested in "language war" banter... just plain, solid advice on which i can make a business decision that will lay a foundation for the next 3 to 4 years of our development initiatives. Thanks!
Another EDIT: My team and i reviewed opinions expressed here and elsewhere. After the disappointment with Linux, we have come to the conclusion that it is likely that moving to Mac from PC would eliminate the windows bugaboos and free us up to keep up with the changes in rails. So... we will be purchasing our first Mac... next week. Thanks all for your help.

Let's see. You have a working Rails site. A pain to maintain, perhaps, but it is working and has been for several years. You have in-depth Rails expertise. You want to build a companion site that is similar enough to the original site that you could share some of the code. You presumably have a business case for this new site and presumably you want it to be working Sooner rather than Later.
Stay with Rails.
While learning a new language will be interesting from an intellectual point of view, it will also be a huge time-waster with no clear benefit unless there is something so fundamentally wrong with your existing Rails infrastructure that it warrants a complete rewrite. Which is what using a new language really means.
Listen to Joel and don't rewrite your code from scratch.
To me, the question is more about moving your Rails platform to a Linux environment or staying with the Windows environment. Someone more expert in Rails will have to answer that.

Whatever your developers already know, use that. Unless you plan to migrate your technology to another platform, don't waste your time. As far as end users, it's a web site so thats where you'll hit your restrictions. Follow proper design and css and you'll be just fine no matter what you use

First of all, you'll not be able to learn .net or java in several months on a good level. If the new site is a small one (like pet project) - choose any technology you want (I recommend ASP.NET MVC 3 :). If the site has some business value then use the tools you know better - RoR.
As for development environment, you don't need Macs to develop using RoR. Simple PC with Ubuntu or Debian linux will be enough.

As a Mac infrastructure and you already have one functioning site in Rails. Rails should be the only choice. Integration will be a lot harder with the other options. Stick with what is working, unless Rails isn't working for your current web app.

Related

advantages of play framework for people coming from php / ruby / python

One of the strongest selling points of play framework is it's development cycle, just fix the code, go back to your browse, hit reload, and go one, all without the write, compile, deploy, hassle typical of j2ee web development.
Nevertheless, for web developers coming from php, ruby or python this is hardly surprissing, moreover it's considered the natural way to develop web apps.
Moreover, many of the advantages of play, (efficient template system, resolve errors quickly, stateless, fun & productive) are taken for granted in those frameworks...
So I'd like to know what do you think are the main advatages that play framework brings to web developer coming from dynamic languages.
From my point of view these are the main advantages
it's java, so if you don't feel confortable with java, and you are not willing to learn it, that might not be an advantage. On the other hand, if you HAVE to use java, coming from php or rails you will feel right at home with play
it's static (except for templates and routes, that's about to change on the next version), so you have compiler checks and safe refactoring.
tool support: IDE support (eclipse, intellij, netbeans)
endless collection of libraries to do everything you want, well, it's just java
runs on the jvm, which has years of experience and optimizations
it's compiled, so you may expect better performance
it's really fullstack: it comes with everything you need to develop a web app, compiler, web server, in memory db server, offline documentation, integrated database manager, local and distributed cache management, fixtures, evolutions, dependency management, lots of utility libraries, unit tests, selenium tests, ide support. You need no apache or mysql setup to get up and running
it has advanced features, like asynchronous requests, web sockets, asynchronous jobs
zero development environment setup: just unzip play.zip, play new my app, play run myapp
excellent documentation
great and fast growing community
scala is firmly in it's horizon, if you come from a dynamic language you might feel more comfortable with a language like scala, even though it's static
can be deployed to any servlet container, like tomcat, but also comes with it's own lightweight server
it's got an ever growing collection of community contributed modules
it's cloud friendly, works on gae, heroku, playapps, cloudbee, dotcloud, etc... (see this question)
source code: this is one of it's main advantages, even though it's often neglected. The source code is pretty readable, understandable and not over engineered. Even without much java knowledge, it's possible to have a look at the code, understand it, and begin contributing to the project
In my particular case, coming from a php & classic asp background, play allowed me get a web application up and running while learning java at the same time. it really let me enjoy my transition from dynamic languages to java...
Play has some advantages compared to other dynamic web frameworks, but I think that if you are proficient in codeignter, rails, django, etc, and if you are not willing to benefit from java's (or scala) ecosystem, you should stick to what you know...
A similar debate has been running on Google Groups recently, but more specifically comparing Play and Ruby (on Rails). I have tried to collate some of the feedback the community has provided on this topic, rather than just give me personal view. Hopefully this will make for a more rounded answer!
statically types business logic layer (and using the new templating engine, even your views will be statically typed). This has therefore the advantage of better IDE support as well.
Can use Java as well as Scala, so you are not restricted to a single technology stack.
Play just works out of the box, but is also highly configurable, so does not force you to work in a particular method.
In memory DB. Great for new developers, who just want to get started. No need to go through setting up WAMP/LAMP server etc, just to get started. Just download play, and you are ready to go!
Its Java (or Scala)! I got hooked on Play because I used PHP begrudgingly because it was the easiest way to host a personal website, but hated that I was building software in a way that I did not feel was well structured. Play allowed me to use Java without the bulk of a J2EE application.
Play framework. Play is heavily inspired by Ruby on Rails and Django. A developer familiar with any of these frameworks will feel at home.
1) Play leverages the power of Java to build web applications,By lifting away the Java EE constraints, Play provides developers with an easy-to-develop and elegant stack aimed at productivity.
2) It focuses on developer productivity and targets RESTful architectures. Play is a perfect companion to agile software development.
3) Folder structure of the play mostly match with the Rails.
4) Play loads the code dynamically. Just fix the bug in Java file and hit reload, the change will get reflected instantly on webpage. No need to go through those sluggish rebuild / deployment / server restart.
5) No configuration: No configuration required just download, unpack and start development.
6) Error discovery is very easy, When an error occurs, play shows the error message, the file path, line number, and relevant code snippet right in the browser.

How much effort needed to deliver a solution based on Apache Ofbiz?

I was trying to get some info from documentation, but it seems that it is one of those projects that you have to check out and play with it to figure the answers out ...
I noticed of hight activity on mailing list and quite a lot of commits, it's a good sign. But when I was looking into the code base (btw 536MB big - not a good sign), I didn't find to much J2EE app fashion in it. No spring, ejb, weird folder structure, quite a lot of non-standard jar libraries. It's like the developers didn't like it so they've done things their own way :-)
I've been using a few similar platforms, mainly portals and for example Liferay is quite easy to work with because it looks as one would expect it to. It is based on Spring, it has, transparent service and dao layer, it has simple plugin architecture (plugin = WAR) etc., typical J2EE development.
I'd like to know what are the key aspects that a developer should be aware of before he decides to use it. And as it is quite non-standard J2EE application, how much time consuming is to get to know it to be able to be productive.
What are its (dis)advantages in comparison with other ERP systems like OpenBravo. If I need mainly Cart rather then ERP backend, should I be interested in OpenTaps ?
I was also playing with Broadleaf Commerce which is way easier to start with.
Thanks very much in advance.
There is a learning curve and it's not easy to get skilled developers who understand the core of the system which is the Entity Engine and Entity Model.
The database model is built on the Universal Data Model which is why it can support a very wide range of data types. Even JIRA is built on the OFBiz Entity engine.
There are many Ecommerce shopping carts built on OFBiz, and it depends on the extent to which you need to customize products or build configurable packages.
It's very well suited for vanilla products i.e. pick and choose, compare, add to cart. Easy to call web services and expose web services, easy to integrate with PayPal etc. So if you're selling Tshirts and Flowers, it's good.
Anything like configuring a complex product like a laptop with various options will require some custom coding in Beanshell (BSH) or Groovy in addition to Java code.
Also it does not naturally integrate with app servers, it runs on it's inbuilt Tomcat but porting to Weblogic etc will be some effort.
The other problem is not enough detailed documentation, I would not say it is missing, it's light - the developer cannot expect an easy tutorial for eveything, it's more "ask and you shall receive" and you will get help on the forums - Usually you get direct replies from David Jones who wrote the framework, so that is helpful. But people who start with OFBiz need at least 3 - 4 months of studying the code and running simple applications before actually building anything.
That's my personal opinion, hope this helps.
I have not worked with Opentaps so really can't comment on that.
Re other Open Source ERP projects: watch out for projects dominated by one company, where the Open Source thing is a marketing vehicle, and it's really Open Core.
Open core means you pay for "plugins" to complete your system, and there is no incentive to standardise and to move functionality into the core.
If it's dominated by one company, they may take the project private at any time, as happened with Compiere.
OFBiz is a genuine community project hosted by the Apache Software Foundation.

What may be the difficulties, if any, with the web applications developed in Java EE?

I have a few questions to understand better Java's usage in context of web applications:-
Is Java EE web development suitable for small start-up (with less human resource) looking to develop an web application ?
What kind of difficulties may arise in Java EE web development, deployment & maintenance ?
What kind of things should be kept in mind/ considerations to be made when moving from PHP background to Java ?
Why Java web applications are not so popular today? ( or in case I perceived it wrongly, please list any major deployments beside linkedIn and ebay)
and Finally, What are some of the most important things to learn before starting web development in Java EE ?
Thank you
Generally the answer to the question of "what technology to use" is "the one which you have most experience with". However, Java EE is huge and clunky, and definitely not good for rapid prototyping, which you will be doing if you're doing a startup.
Personally I would recommend a more modern and dynamic environment. If you're coming from PHP, you should be able to pick up Ruby on Rails or Django (Python) easily. These two choices are in my opinion orders of magnitude better than Java EE. If you want to stick with Java, at least go with the Play framework then.
Is Java EE web development suitable for small start-up (with less human resource) looking to develop an web application ?
Yes, I worked in a startup where I was the only full time programmer.
What kind of difficulties may arise in Java EE web development, deployment & maintenance ?
The same as in any other web development shop. Of course, the problems have their Java flavor. For instance, one bug we discovered was caused by different minor version of JDK used on the live system than on our test system.
What kind of things should be kept in mind/ considerations to be made when moving from PHP background to Java ? Do not code the PHP way. Java's strength is OOP and its many libraries/ open source frameworks. Use that.
Why Java web applications are not so popular today? ( or in case I perceived it wrongly, please list any major deployments beside linkedIn and ebay)
I don't know why you think that, but Java is used everywhere. It is one of the few languages that Google officially uses. They use PHP as well, but it has a "lower" status.
and Finally, What are some of the most important things to learn before starting web development in Java EE ? Use Java's strong points which I mentioned above.
Updated after comment
I cannot make the choice for you. If you are in doubt and in a big hurry you should not go with Java. This is common sense. However, it is an opportunity for your team to learn and grow. Maybe there is a PHP/other client for Cassandra. I knew a former PHP programmer in a startup, who switched to Java. Not saying anything bad about PHP programmers in general, but he did all kinds of strange things, such as not leveraging the power of Java web frameworks and writing lots of procedural code mixed with HTML and SQL. Obviously there are lots of Java programmers who would do the same thing. The point is that your team will probably learn new ways to do things and benefit from it in the future.
Allow me to answer these from the perspectives of a developer/architect in a small start-up, experiencing a bunch of these issues.
What kind of difficulties may arise in Java EE web development, deployment & maintenance ?
How do you decide on which toolset/framework to use? Do you need an IDE? Which version control system and why? Do you want to develop at some place and deploy somewhere else, or develop directly on the server? Do you buy a linux box for this, or rent some cloud? How much do they cost, in terms of licenses and training?
What kind of things should be kept in mind/ considerations to be made when moving from PHP background to Java ?
How would your servlet send out an e-mail? It's much simpler in PHP. Need secure transfer of encrypted objects? Java is your friend. What about session tracking? Use cookies, or have a dedicated class do it? How do you access the database? Want to use hibernate? What other tools is hibernate dependent on? What are their costs (license+learning)? Can you use JDBC directly? What are the pros and cons? Which db to use to why.
Why Java web applications are not so popular today? ( or in case I perceived it wrongly, please list any major deployments beside linkedIn and ebay)
I am not sure if this is the case, but possible reasons could be the availability of .net and integration with C# based systems and Apple ditching Java from its SDK. But that is my speculation, don't quote me on it. I am developing a large scale system myself with Java 6.
and Finally, What are some of the most important things to learn before starting web development in Java EE ?
(This is my opinion) have a test or trial set up of the entire architecture. Is the GUI web-brower based? Is it an applet? Standalone application talking to a server? JNLP system downloading archives and JRE off the net? You will find some stuff do not work on Windows 7, some do not on Vista, W3C have deprecated the applet tag from HTML but Sun/Oracle asks you to use it, different browsers do not support contents of your style sheet, etc.
Firewall set up is another major challenge - you start using thread pooling using Spring libraries and your capabilities to use DBvisualizer to check on DB tables are gone! Now you need a DBA and a sys-admin to fix these who you do not have!
Personally I found the LAMP architecture (Linux-Apache-MySQL-PHP) the fastest way to go for smaller applications, but if you need heavier guns for your app (security, GUI with swing, multithreading, etc), replace the P in LAMP with a tomcat container. The hardest thing I find is to judge the value of a tool in the context of my application - I do not need a tool that generates Java files with getter/setter methods given a list of variables - to me that is yet another level of indirection, but then JUnit in eclipse is helpful for debugging.
Just shared some of my thoughts - hope this helps, - M.S.
For a startup an interesting choice could be the Lift web framework, which is used for developing "Java Web Applications" (although in Scala).

Which Java EE server should I use?

OK, this is a little unusual, because ANY Java EE container can do the simple things I want to do (XML processing, JPA, Hibernate, SOAP/REST web services, etc). This is for personal use, more to gain skills than to accomplish essential functionality. I have my own Linux server (Ubuntu Jaunty x86_64) with business class internet, so I can install pretty much anything.
I use Tomcat a lot now, however, I ran into a few situations lately job hunting where they were looking for experience in a specific Java EE container (which defeats the whole purpose of having a standard), and of course not the same one each time.
So what I'm looking for is a Java EE server that:
Is in demand in the marketplace right now
Is free (or
Is not too horrendous (disk space, time) to install and to deploy applications on
Runs on Ubuntu x86_64
I've been able to glean some information via Indeed's keyword search, and that tells me to stay away from Jetty/Glassfish, even though they fit "lightweight" and "free". I also see from this SO post that WebSphere is a steaming pantload of bloatware that's hard to deploy/configure, but I don't know if that's accurate or current. I like Tomcat (completely FOSS, smallish, easy to deploy, plenty of docs/users), but it's less in demand than some of the bigger boys.
So what would you recommend I install? Thanks in advance.
My personal recommendation is JBoss. Not only is this a solid server, but there are other JBoss Platforms and Frameworks that easily integrate into JBoss. One example is JBoss ESB.
Far too often, I've seen servers like JBoss and WebSphere (I've worked with them for the last 5 years now) rush to market with broken implementations. Unfortunantely, the part that is broken might be very small, but it will be just what you will be breaking your head on.
Oracle Weblogic just kicked the hell out of me with a broken implementation of MDBs (annotations).
If you want a server that is the most Java EE 5 compliant, will give you the least heartache and pretty much production-worthy, go for Glassfish and yes... use Netbeans as your dev IDE.
+1 on JBoss, that is mainly what I use for personal use and work. I have also used OC4J, and find that it is harder to use, and more finicky with it's class loading mechanism, maybe I'm just used to JBoss. But there is definitely more and easier to find community support for JBoss. So that is reason enough if you are doing this for personal use and are not going to get a support license, there will be many more users willing to help out if/when you encounter issues.
I've only used Tomcat myself, professionally. I've been using it for the better part of my (so far) three year career and I havn't experienced many problems with configuring or deploying applications to it. I use Eclipse WTP for Java EE developers 3.4 (Europa) at work, and mostly develop JSF applications utilizing ICEFaces. We deploy using the Tomcat web manager for most of our smaller projects, and through Hudson for some of our broader applications.
Please bear in mind some caveats, however:
We host about 20 seperate web applications, mostly JSF with a few older JSP apps.
The web applications served by my office have a very, very narrow scale. Our department currently supports about 20 unique users, so most of our applications do not receive a lot of heavy traffic.
Most of our web applications are very processor intensive (i.e. here's a 2GB CSV file...write a program to calculate the total number of people that reside within homes that have 3 or more children...) that only usually perform one-off runs either weekly or daily (or even yearly...). In other words, "Give me all your resources for 2 hours...then I'm going to lunch".
Our primary web server is a Solaris 10 box with a Dual core sparc processor (I believe clocked at 1.8 GHz if memory serves correctly), with 2GB of RAM (don't recall if it is DDR or DDR2).
That being said, I've definitely noticed performance problems over time with regards to our application environment that probably have more to do with our application code as opposed to Tomcat itself. I'm willing to bet that the problems have to do with poor memory management within our processing logic and data allocation than anything. The reason I believe this is because on a fresh restart of Tomcat our applications usually execute in an incredibly responsive fashion, yet over the course of even just one or two days the user experience is degraded.
Take it for what you will. We've probably got some problems to deal with on our end, but Tomcat itself seems to be pretty performant in a localized environment.
I ran into a few situations lately job
hunting where they were looking for
experience in a specific J2EE
container (which defeats the whole
purpose of having a standard), and of
course not the same one each time.
Well, I think you have (half) answered the question yourself! If your primary aim is to help you find a job, you need to look at what Java EE container the recruiters in your geographical area are asking for. Go to your favourite recruiting websites, pull up the Java / Java EE jobs for your area for the last couple of months, and count for each kind of web container. (And also count the jobs that don't specify a particular web container.)
If the results of your research say that you need to learn WebSphere, you have my sympathy :-)
Don't forget that a "mandatory" requirement may not actually be mandatory if you are you are good enough in other areas. It all depends on what other candidates the recruiter can find. Don't be afraid to say "you asked for X, but I have Y and Z which demonstrates that I have broader experience with this technology".
Oracle officially ceased to support Glassfish. All bugs found there (and there are quite a lot of them) will never be fixed.
Payara is now the best option, as this is a clone of Glassfish, but is continued to be developed by the Java community.

How do you go on about learning enterprise Java application servers?

Alright, the question might be broad. We've been looking at Jboss and a few other similar app. servers.
From the feature list it would be perfect for replacing our soon to be outdated homegrown reporting application on the server side. But at this point, for 2 developers, just grasping all the setup, configuration, administration, tuning,testing not to mention the APIs and programming itself just seems way too much, too big, too complex.
What path does people take to become familiar and productive with such application servers ?
Start with a simple one, and only use a more complex one if you really need the features.
For example, Do you really need the full JBoss stack? Would Tomcat not be sufficient? It's much less of a handful.
I would approach this the same way I approach anything new.
Start with the documentation - read the introduction and basic setup/configuration documents. Then move on to tutorials and maybe some simple apps that I find interesting. In your case, maybe port a few features over to the new system. As time goes on, you should get better with the tools at hand.
From my experience using one is the best way to learn what you like/dislike about it. Once you have a project set up for one application server it should not be too much work to migrate it to another. I am currently working on an application that we develop & test daily using a simple Tomcat v6 server, but which runs in production on both Websphere Application Server and JBoss.
As a side note for your development, I strongly recommend looking into integrating your Eclipse development environment with your chosen application server through server adapters - it will greatly speed up development tasks and simplify the debugging process.
I'd say that the minimum features for using Java EE are:
Servlets and JSPs, written using JSTL (no scriptlets)
JDBC
JNDI for pooling database connections (optional but recommended)
Basic authentication for security
You can accomplish a great deal knowing just those. If you want to minimize the learning curve, I'd recommend starting with those and staying away from EJBs, JMS, Struts, JSF, etc.
Another benefit is that this subset of features is common to both servlet/JSP engines, like Tomcat, Jetty, Resin, etc. and full-blown Java EE app servers like WebLogic, JBOSS, WebSphere, etc. An app that runs on one should be portable to any of the others, as long as you stay away from app engine-specific extensions.
You should realize that there's a trade-off here. You'll have to develop pieces that might be easier if you leverage the app server more. But hopefully you'll start with some simpler problems and work your way up once you're comfortable with the basics.
There's another approach: Hire an experienced guide to help you with training and mentoring for the first project. A six-month gig with a reputable consulting firm might get you started.
Last of all, I'd recommend Spring. It would also have a learning curve, but it's a good alternative to Java EE EJB development.

Categories

Resources