Java or mono for a new project - java

I need your advice about framework selection (Java vs Mono) for a new large scale web project which will be developed for linux hardware.
Which platform do you prefer and why ?
Best Regards,
Sirmak

Since you haven't specified anything about the project nor the developers' expertise, they are the same. Both have a lot of strengths and weaknesses, both are free, and both can use high-level languages which get precompiled, the precompiled stuff getting interpreted at runtime. Both have tons of technologies to do a "large scale web project" including technologies for abstracting the DB layer and doing pages and templating. Both have many many many MVC frameworks. Both have CMSes available. Both have ways to work with mobile devices, and multiple UI frameworks.
If you have no specific needs whatsoever, flip a coin. You'll be fine with either. On the other hand, you might want to know your project a bit better before asking this question.
Edit: If you have a "strong .Net background" as you say in your comment under your question, then Mono is a great fit. It's not that Mono allows you to do "something like" .Net: Mono allows you to run .Net assemblies without any alteration in most cases. This means that you can develop in .Net yet deploy on Mono (Of course you'll want to be testing on Mono during the entire development cycle), or develop for Mono without retraining your developers. Mono is, in 2009, mature and being used in many places.
As far as distributed searching/caching goes, what technologies are you looking at in Java that might work? This will give the Mono experts a chance to propose Mono alternatives.

Another thing you need to consider are the skill sets of the people working on this, and how easy you'll find it in the future to hire Java/Mono people wherever you are (or are you willing to train them).
You can specify a great framework, but if you can't find people to work on it then you've got a major problem.

Sirmak, You should check out this post where they talk about Mono performance. This might factor into your concern. In summary, Mono is still slower compared to others.

Related

What's the best language/platform for SOA on Linux in a post-Java world?

I need to choose a language/platform for the new development of a series of services in a SOA. I'm looking into Scala and Clojure but don't think the community and products are mature enough for a real-world enterprise product yet.
Update/Clarifications:
Of course we can use many languages/platforms for SOA but some language/platforms are easier and more suited for an SOA. IMO the best ones for SOA should allow interface programming (to ease definition of contracts), should have options for hosting the services (like Felix for Java or WCF in .NET) and scale well (see Twitter issues with RoR).
Java has always been the favourite in the enterprise market. However, many developers are looking into dynamic languages as well as talking about stagnation of Java after v6. As a result many new post Java languages have arrived: Scala, Clojure and Groovy to name a few that still run on JVM but are not Java.
I hope these clarify the question.
Depends what you mean by "mature enough for a real-world enterprise product", and your relative level of tolerance for living on the cutting edge.
For example, I'm currently building a "real-world enterprise product" in Clojure (I'd have been equally happy with Scala, it was only that Clojure fitted my needs slightly better from the concurrency and meta-programming perspective).
I'm very happy with my decision.
Some quick perspectives if you are considering this "post-Java" path:
The communities are great and supportive, but you'll still have to solve problems yourself, if only because nobody else has run into the same problem yet. None of these are likely to be insurmountable, but it does present a bit of extra risk to delivery schedules.
Both Scala and Clojure can be very productive (in terms of value delivered to customers per hour coding), but you can equally well write bad and unmaintainable code in any langauge. Java pretty much forces you to write things in a standardised, somewhat verbose but syntactically simple and understandable way. With Scala and Clojure you get a whole new arsenal of crazy ways to hit your target or shoot yourself in the foot. Is your team going to be able to make the best use of Scala/Clojure advantages?
It's harder (though by no means impossible) to bring skilled people on board with existing Clojure/Scala skills. On the flipside, the people who do have these skills (or are keen to acquire them) are likely to be among the more talented / motivated developers so the search may still be productive.
Be prepared to make tough decisions regarding whether to target language/library features that are "just round the corner". For example, do you wait for the enhanced primitive support coming in Clojure 1.3? Or make do with the perfectly adequate but slower boxed primitive functions in Clojure 1.2?
A great benefit of being on the JVM is that you can still take full advantage of the Java ecosystem without being tied to Java as a language. Don't underestimate how useful this is: for example, I use a number of extremely well tested, mature Java libraries (e.g. Netty) pretty much transparently in my Clojure application. This significantly reduces your risk and the amount of new development that you need to do.
At the moment (having just completed a services/integration project ) Jersey on top of Spring are right up there on my favourites list for web services.
I can't offer any suggestions for a SOA framework, last time I was involved in that type of thing we user Oracle BPEL Process Manager and I have mixed feelings about it. We weren't using REST then either and I'm not sure how well the Oracle software works with it.
For me python seems the easiest way to do some SOA and have interoperability with Windows computers. I don't have frameworks name but there is a lot of them in SOAP, REST, RPC...

Is Java (Java EE) not good for building a wordpress like CMS?

I observed that generally all good CMS, forums and portals are written in PHP only. Some of them are written with the help of Python, Ruby, etc.
Some of the CMS which were build in Java, were not so flexible as wordpress is. Is Java (Java EE) not good for building a wordpress like CMS?
I think the primary reason is that many CMS's have grown from an initial small implementation instead of being designed from the start to be able to be big.
Small implementations are nice and easy to do in PHP or other scripting languages, and you can grow them pretty big, but if you know up front that you want something big you make it part of the original specification.
These days most people agree that you need a strong, fast, scalable runtime system where the major contenders these days are the JVM and the .NET runtime.
When you have made THAT decision, PHP is not the immediate, intuitive choice for a big scalable system.
Facebook, portals and forums use PHP. Banks and flight ticket reservation systems use Java. I think it pretty much summarizes their difference.
With amusement applications, it's important to get things done quickly and easily, and some dirtiness is acceptable. With real business, robustness, security and clarity are the primary goals, overriding the ease of getting things done quickly.
i observed that generally all good
CMS, forums and portals are written in
PHP only.
That's a broad generalization. Case in point: one of the most widely-used CMS systems in the world is Microsoft SharePoint, written mainly in .Net/SQL Server.
To your specific question, PHP has a great community around it and lends itself to rapid application development. Technically, Java is arguably better structured and more object-oriented, but in my experience there is a higher bar to entry.
Ultimately, it comes down to what you are comfortable with and the specific requirements of your application.
For an example of a fully-featured CMS written in Java, take a look at Alfresco.
As always, it depends :)
An advantage of PHP is that it is available on a lot of web servers and quite "simple" to program. Also, it was designed with the intent of being integrated into web sites.
In principle, you could do this with Java as well, either with JavaScript (which really doesn't have too much to do with Java...) or as an Applet. The important difference is that applets are run on the client side, so when you actually want to manage content it would be on the wrong end, and you'd have to think about how to authenticate etc.

What language (Java or Python) + framework for mid sized web project?

I plan to start a mid sized web project, what language + framework would you recommend?
I know Java and Python. I am looking for something simple.
Is App Engine a good option? I like the overall simplicity and free hosting, but I am worried about the datastore (how difficult is it to make it similarly fast as a standard SQL solution? + I need fulltext search + I need to filter objects by several parameters).
What about Java with Stripes? Should I use another framework in addition to Stripes (e.g. for database).
UPDATE:
Thanks for the advice, I finally decided to use Django with Eclipse/PyDev as an IDE.
Python/Django is simple and elegant, it's widely used and there is a great documentation. A small disadvantage is that perhaps I'll have to buy a VPS, but it shouldn't be very hard to port the project to App Engine, which is free to some extent.
Since you mentioned python, I would suggest looking into Django. You may need to look harder for hosting options, however...
Is App Engine a good option? I like the overall simplicity and free hosting, but I am worried about the datastore (how difficult is it to make it similarly fast as a standard SQL solution? + I need fulltext search + I need to filter objects by several parameters).
App Engine is nice. It supports Python or Java (with some limitations), and it provides free hosting for small needs (rare, at least for Java). But I wouldn't expect the exact same performances as with dedicated servers, the cloud is about scalability, not performance (you won't always get the fastest response time for a single hit; however, GAE would handle gazillions of concurrent hits without any problem while your servers would be on fire). But this scalability is not without cost; if you don't need it, the development tradeoffs may be too much trouble. And also note that it does not support full-text search out of the box (what an irony), you will have to use extra tooling.
What about Java with Stripes? Should I use another framework besides Stripes (e.g. for database).
I like Stripes very much. I love its conventions over configuration approach, it's a very elegant and simple framework (but still powerful). Definitely not a bad choice. For persistence, if you go for GAE, you will have to use JPA or JDO. If you don't, it's at your discretion (although I would go for JPA).
See also
Google AppEngine - A Second Look
As many things in life, this depends on what your goals are. If you intend to learn a web framework that is used in corporate environments, then choose a Java solution. If not, don't. Python is certainly more elegant and generally more fun in pretty much every way.
As to which framework to use, django has the most mindshare, as evidenced by the number of questions asked about it here. My understanding is that it's also pretty good. It's best suited for CMS-like web sites, though - at least that's what it's coming from and what it's optimized for. You might also have a look at one of the simpler, nimbler ones, such as the relatively new flask. All of these are enjoyable, though they may not all have all features on AppEngine.
Kay and Tipfy are excellent Python framework choices when you target specifically GAE. Kay is modelled after and similar to Django, but is better suited to GAE.
I've been kick App Engine around a little bit, and so far the DataStore is pretty quick... there is a bit of a learning curve compared to SQL, but I've had no real issues. I'm not sure about fulltext search, however filtering is simple, you would just run each filter one at a time.
class DBModel(db.Model):
field1 = db.StringProperty()
field2 = db.StringProperty()
field3 = db.IntegerProperty()
GQLObj = DBModel.all().filter('field1 =', 'Foo')
GQLObj = GQLObj.filter('field2 =', 'Bar')
As far as hosting, with GAE I'm not sure you even get a choice, I know you can register your own domain with google though.
I don't think the datastore is a problem. Many people will reject it out of hand because they want a standard relational database; if you are willing to consider a datastore in general then I doubt you will have any problems with the GAE datastore. Personally, I quite like it.
The thing that might trip you up is the operational limitations. For example, did you know that an HTTP request must complete within 10 seconds?
What if you get 50% of the way through a project and then find that a web service you are using sometimes take 15 seconds to respond? Now you are toast. You can't pay extra to get the limit raised or anything like that.
So, my point is that you must approach GAE with great care. Learn about the limitations and make sure that they will not be a problem before you start using it.
It depends on your personality. There's no right answer to this question any more than there's a right answer to "what kind of car should I drive?"
If you're artistic and believe code should be beautiful, use Rails.
If you're a real hacker type, I think you'll find a full-stack framework such as Rails or Django to be unsatisfying. These frameworks are "opinionated" software, which means you have to really embrace the author's vision to be most productive.
The wonderful thing about web development in the Python world is there's several great minimal frameworks. I've used several, including web.py, GAE's webapp, and cherrypy. These frameworks are like "here's a request, give me a string to serve up." It's raw. Don't think you'll be stuck in Python concatenating strings though, God no. There's also several excellent templating libraries for Python. I can personally recommend Cheetah but Mako also looks good.
Google App Engine + GWT and you have a pretty powerful combination for developing web applications. The datastore is quite fast, and it has so far done the job quite nicely for me.
In my project I had to do a lot of redesigning of my database model, because it was made for a traditional relational database, and some things were not (directly) possible with the datastore.
GWT has a fairly moderate learning curve, but it gets the job done very well. The gui code is really easy to get started with, but it's the asynchronous way of thinking that's the hardest part.
As for search I don't think it's supported in the framework. Filtering is possible on parameters.
There are some limitations to GAE, and you should consider them before putting all your eggs in that basket. The fact that GAE uses J2EE distribution standards makes the application very easy to move to a dedicated server, should the limitations of GAE become a problem. In fact I only think you would have to refactor the part of your code that makes the queries and stores the data (which shouldn't be much more than 100 lines).
I've built several apps on GAE (with Python) over the last year. It's hard to beat the ease with which you can get an app up and running quickly. Don't discount the value in that alone.
While you may not understand the datastore yet, it is extremely well documented and there are great resources - including this one - to help you get past any problem you might have.

Java or Scala for new greenfield projects?

After I read Bloch's discussion http://www.infoq.com/news/2010/04/bloch_java_future
I started to think about "Do I have to switch to scala for new web developements" or is java preferred in all cases. What is your opinion ?
Thanks,
If your choice is between Java or Scala, you should probably go with Scala. Spring, Hibernete, etc. works just fine with Scala, so if you can use it right now. Tooling for Scala isn't too bad in IntelliJ at this point. It's not like it was 6 months to a year ago.
However, I must caution you... Java is a pretty bloated platform at this point for strictly web development. I was a hardcore Java software architect for 9 years, and have been doing Scala recently, so I have a bias towards these platforms. Even still, if all you want to do is make an app that provides modest functionality over a database, you should just use Grails, or even Rails (although Grails will probably fit your skillset better).
I wouldn't recommend doing Lift for Scala unless you already know functional programming.
It depends on what kind of web applications you want to work with although I would choose java due to the large code and API base its large community
I am still a big fan of Java Spring. Some people think it might be a little heavy weight however, with annotations and auto wiring, you can put together Web apps really quickly. As well, with Java, you have access to a whole wealth of open source libraries especially from Apache commons.
One of the things I don't really like about Scala/Lift is that the line between view and controllers are a little mixed. With Java Spring, there is a clear distinction between view and controllers particularly if you use a template language for the view like Apache Velocity.
Over all though, depending on the size of your project, I don't think there is a large difference between Scala and Java. Both will do the job for you. If your project has the potential of becoming very big, I would err on choosing Java because of its maturity and large body of mature open source libraries readily available.
I think it depends on the scale of your web applications and your human resources. Do you have good programmers who can catch up with the new technology quickly? You also need to care about the due time for the project and the budget as well.
It may be a good time to try out new technology only if it is really suitable for your project. Java still has a strong position in community and you can also find a lot of supports and open source framework.

Web: When should I consider using Java rather than PHP, Python/Django, Ruby/Rails, etc?

If gathering requirements for a medium-to-large web-based project, at what point should one consider using Java-based back-end, JSP, etc, over a scripting language like PHP, Python, or Ruby?
Hearing "use the right tool...", when is Java the right tool for web-based projects?
What is the "Best" language is often degrades to an emotional debate rather than practical. Champions of each language are extremely good at making arguments for why each language is the best. I ususally look ata couple of factors:
A) What languages are you and your team confortable with?
B) Is there an existing application/system to be extended or integrated? If so, what languages are most effective for such an integration
C) Are there built in or redily available libararies, components, etc that will allow you to more effectively produce results in one language over another
My decisions almost always boil down to what language/platform is my team going to be most effective on both developming and maintaining.
In my opinion, the language decision cannot be made independently of the larger development and runtime platform. This is implied by what James Conigliaro wrote, and also by what jonnii wrote, but neither called it out specifically.
Making such a decision, people often use unwarranted relative weightings for different evaluation criteria. For example, one of the criteria might be "runs on iPhone." But if you are not actually developing on an iPhone, you really don't care.
"Performance" is another criterion that can get an unwarranted weighting. Most Intel-based servers today, costing let's say $2000 without storage, are plenty fast to support a fairly high-volume web site regardless of your choice of language. If your load exceeds that which can be run on a single server (don't assume!), or if you need to share the server among different workloads, then perf may become more important. But generally your app load will fit in a 1-server box.
The development environment, including the IDE but also the source code control, the configuration management, and defect tracking - I guess what you might call application lifecycle stuff - is more important, in my opinion, than the language per se.
Another aspect you may wish to consider is, the "pull" the language itself will have on devs for your team. In the early days of Java, you could attract devs just by saying "we're doing it in Java." Now, that phenomenon has largely faded for Java, but in pockets it may still be true for other langs and platforms. This factor may or may not be important to you.
Pick the language/platform that your team is most comfortable using, the one which matches your deployment target and that you're mostly proficient in.
I have over 20 years of programming experience and I learned one important fact: it doesn't matter which tool you use, as long as you're comfortable using that tool. For larger teams, all team members must be comfortable with the choice you made.
I always tell people that it doesn't matter which tools you used to create an application. All that counts is if it will work as expected.
I'm planning to use Java for a project served using Google App Engine (Java support, of course). This is not The Answer [tm], but only my 2 cents :-)
Whoever has the libraries you need:
If you want to customize something pre-made, use PHP. This will usually be shopping carts, forums, and CMS
Java will have more libraries for random things (like fetching RSS feeds)
Don't know about Python/Ruby on Rails;
Rails is simple to learn, well organized and well documented. It's also agile and RAD (rapid application development). It's not perfect, but you could give it a try. It's another take on the web development. Java web framework are not so easy to understand and start is not so simple IMHO.
If you have to build a large web application, with rails you could separate the monolith app with different apps and then use ActiveResource restfully.
http://guides.rubyonrails.org
Almost always :-)
What I mean is that you can do any web project with Java/JSP adding more or less to the mix ( Spring, iBatis, etc )
But, as already pointed out, there are cases when you decide to use something else because for instance your team has a lot of experience with younameit and no experience with java or things like that.

Categories

Resources