Posts Tagged ‘Java’
Working with many startups I was wondering recently why Python and Ruby are so popular and common with young and promising startups, especially Scandinavian ones as my experience shows. I am curious if anyone has analyzed the trend towards Python over Ruby with startups? Also I would like to find out what are the advantages of Python over Ruby if they are so?
I think a lot about choices and decisions at startups. Picking the language/platform to use at a startup is one of the harder decisions. Here I would like to mention the fact that most of startups today make their choice toward Python or Ruby over PHP or Java. From what I have read, PHP is just an inferior language to Python and Ruby. Even though a lot of people are using PHP because it is easy to get started, it seems to be easier to develop bad habits with PHP. Why jump on a bandwagon when you obviously know is broken? I’ve come to realize that the main reason why PHP gets into trouble with the purists is that there are just so many ways of doing one thing — it is not that standardized. I think it became the most popular language only because it’s so easy to pick up!
Python/Ruby win over Java on speed of development, and conciseness of code. This generally makes Python/Ruby a better choice for small startups for whom speed to market, and ability to implement new features matters most. Most of the modern sites chose Python when they were small startups. Only later did they have to scale. Websites tend to be horizontally scalable, meaning that for a surprising range of volumes of traffic you can just throw more webservers at it and the bottlenecks will be at other layers (for instance the database).
Searching for relevant information to compare both Pyton vs Ruby languages and analyzing customers’ demand on the software development market I found out that Python appeared to be the more popular choice for startups trying to get a minimum viable product launched and seek out potential venture capital.
This has less to do with the merits of either language and more to do with the philosophies of the frameworks represented by either language. RoR really can’t be beat as a rapid application development framework, and developers discussing Ruby on the web are generally referring to RoR. Django purports to do the same, but the overall philosophy of the python community is more minimalistic – python developers generally prefer to make their own selection of tools such as ORMs, Persistency layers and libraries. A lot of people start Python web development with Django but move on to something more minimalistic like Flask, simply because the community seems predisposed to building its own stack in this way. RoR is more opinionated, and developers who are more predisposed to hitting the ground running, especially in the startup field, often take the Ruby fork in the road.
There is a “coming of age” point for startups coming from RoR or PHP, however. I’ve heard about several companies who had this exact same experience and ended up moving towards something like Python or Scala. I’m not certain this is specific to python, but I can say that as startups grow and become more ambitious, they move into problem domains poorly represented strictly by web frameworks/languages. Search features and data extraction increasingly rely on advanced data mining techniques utilizing things like natural language processing and find they need to reengineer their stack a little to accommodate new ideas. Increasingly I see companies not abandoning their RoR/PHP/Django frontends, but creating separate REST APIs that almost always use bare python or a JVM language to take advantage of more complex computation outside of the HTTP req/response model. Ruby could be used for this kind of offline processing, but the toolkits are just better and more mature in other languages since RoR is so prevalent in the Ruby community and consumes a great deal of the mindshare.
The fact of the matter is that most web startups represent feature sets early on where development speed is the prime concern, and so the language/framework with the biggest potential hire base and best RAD features typically win out early on.
As my personal point of view that no single language can answer every problem satisfactorily, and it is foolish to stubbornly stick to a single language for every case. Nevertheless a lot of our clients stick to Python when starting up their business. Let’s try to see what are the advantages of Python over Ruby?
The two are more similar than they are different, in everything from design to disadvantages to common uses – you can’t really go wrong either way, and shouldn’t base your decision on syntactical differences.
As Ruby developers say, Python’s main advantage has nothing to do with the language’s features. It’s more subjective: it seems that Python has more momentum amongst serious computer scientists. It’s increasingly popular in academic and scientific applications, and a lot of the technologists I respect the most seem to prefer it. By comparison, the Ruby community feels more designer-y and relatively more novice.
What this means is that while the Ruby world has very slick out-of-the-box product solutions, the Python world seems to produce more exceptionally well-written components like Tornado (web framework). Combined with it being used at Google and the potential for stuff like LiveNode to be released as open-source, I’d cast my lot with Python if I were starting today.
Thinking Python may be the best choice of startups, what is your opinion on this?
Looking forward to hearing from you!
Some people will argue that it’s not worthy comparing Tomcat and JBoss, because one of them is a superset of the other. In fact JBoss is bundled with a forked version of Tomcat. So JBoss is Tomcat plus:
* JMS messaging provider
* Web Services engine (JAX-WS and/or JAX-RS)
* Management capabilities like JMX and a scripted administration interface
* A powerful data grid solution (Infinispan)
* Advanced security, e.g. out-of-the-box integration with 3rd party directories
* A dynamic and powerful clustering engine
* Transaction management service
Still many decision makers have to choose between these two, so lets’ take a deeper look at them.
The JBoss AS is an application server based on Java. It is an open source server and is usable in any operating system supported by Java.
Apache Tomcat, or its more widely known name Tomcat, is a servlet container (meaning it is a Java class that operates under the strictures of the Java Servlet API – a protocol by which a Java class responds to an http request). This is an open source server, providing a ‘pure Java’ HTTP web server environment in which code written in Java is capable of running.
Tomcat is only a servlet engine and JBoss offers many more functionalities out of the box. Still JBoss is no longer a heavyweight monolithic container, but a modular application server featuring true classloading isolation, modules loaded on demand, domain management and exceptionally lightweight container. It has a pluggable architecture and if required, you can unplug features from JBoss to make it essentially a Tomcat servlet container.
At the same time the plus going in favour of Tomcat is that it is fairly lightweight, and it means less memory requirement and a faster response. At the same time if you need certain JEE features beyond the Servlet API, you can easily enhance Tomcat. For example, if you need JPA features you can include Hibernate or OpenEJB and JPA works nearly out of the box.
Tomcat is hassle free and might be the right choice when you are not using much of Java features. It is a very good fit if it comes to web centric, user facing applications.
In case backend integration comes into play, a JEE application server should be considered. Last but not least, migrating a WAR developed for Tomcat to JBoss should be a 1 day exercise.
Some people still argue that instead of using application servers, one can still deliver a full stack application using Tomcat + Spring adding the right frameworks and writing the Spring integration layer with these frameworks. That’s for sure true. Still the logical question is what price you will have to pay for that. The JBoss project can be focused around average – to junior developers. Mastering the same complex stack of technologies with Tomcat and Spring requires skilled and well paid developers.
To make it short, Tomcat is merely an HTTP server and Java servlet container. JBoss is a full-blown JEE application servers, including an EJB container and all the other features of that stack. On the other hand, Tomcat has a lighter memory footprint (~60-70 MB), while JBoss weigh in at hundreds of megs. Tomcat is very popular for simple web applications, or applications using frameworks such as Spring that do not require a full JEE server. Administration of a Tomcat server is arguably easier, as there are fewer moving parts.
However, for applications that do require a full JEE stack (or at least more pieces that could easily be bolted-on to Tomcat) JBoss is one of the most popular open source offerings. JBoss has a larger and deeper user community, and a more mature codebase.
So, we should not really care anymore about which is better, but focus on the application requirements. However, you can still use the best of these two worlds in your enterprise applications.
It would be great if your could share your opinions on this topic Thanks in advance for your comments!
Scala is a statically typed and multi-paradigm programming language that runs on Java virtual machine and provides Java like syntax with a few improvements.
Being a multi-paradigm programming language, Scala allows for mixing multiple programming styles such as object oriented, imperative and functional programming. Whether it’s good or not, it is not a question that could be answered with a yes or no. Supporters would say that programmers can choose from a variety of styles and stick to the best depending on their needs. The others would argue that putting together some features found in many other programming languages can’t work well, mostly by increasing complexity and making a programming language obscure.
Scala code compiles to a byte code and runs on Java virtual machine, thus it is compatible with other Java applications. If most of your code and libraries are from Java world, this can be nothing but a good thing. At the same time some additional complexity in Scala is dictated by assuring compatibility with Java.
For some developers the Scala code is obscure, for others could be a nice and neat form of solving some specific problems.
One more positive aspect of Scala is its conciseness. We all know how Java verbose is and how many boiler code developers write everyday including constructors, getters, variable initialisation (type and generics), semicolons and many others.
Now let’s see some other aspects of working with Scala:
At first sight the performance in Scala is very good, comparable to Java. Scala code compiles to the same byte code as Java does and runs on the same Java virtual machine. Still how fast Scala code is may vary from case to case and usually it’s up to the way how the code is written. The awareness of how to write a high performance Scala code is especially important for Java developers who are not very experienced in both Scala and functional programming.
There are not too many development tools created specifically to serve Scala, but fortunately, thanks to compatibility with Java it doesn’t look so bad. One family of tools hardly usable in Scala are those, which do some sort of code analysis, for instance code coverage and static code analysis. Static code analysis tools are even less usable.
The two worth to mention native Scala extensions are Lift web framework and Akka actors platform.
The majority of libraries and frameworks from a Java world, should be possible to use quite smoothly, which among other things, is thanks to implicit conversions in Scala.
Interoperability between Scala and other programming languages, including Java/C/C++, is very good, mostly because of running on Java virtual machine. What Java may talk to, Scala can do as well. Taking into account support for implicit conversions described above, I would state that Scala is one of the leaders of interoperability among all programming languages.
Developers are provided with all they need to test Scala applications efficiently. To follow a Test Driven Development methodology, they can use popular in Java world Junit tool. If someone is more keen on Behaviour Driven Development then ScalaTest is a way to go.
Monitoring and maintenance
One of the main monitoring tools to analyze production Scala applications is JMX (Java Management Extensions). This tool does its job well when we want to analyse some predefined statistics, but sometimes we need to investigate some aspects of a production application while it’s running and JMX can’t provide all required data. To deal with such scenarios, Java provides Java Virtual Machine Tool Interface (JVM TI) that allows for inspecting running Java applications but it can be used for Scala too.
Scala community, including forum, mailing list and blogs, is not the biggest in the world, but it’s very energetic. Most people who are part of a Scala community are very passionate developers, which are always happy to help others to solve their problems. Books are also great: Programming in Scala book by Marting Oderski, Lex Spoon and Bill Venners.
No one will argue that it is far behind other programming languages such as Java or C/C++. Still while looking for Scala developers we could search for Java developers with Scala interests as well. The learning curve is not massive as Scala follows Java syntax. In such case, at least on experienced Scala developer would help the team adopting new programming language.
Have you moved from Java to Scala? How do you find this language?
Thanks for sharing your opinion!
Few people engaged in software development sphere would deny the popularity of Spring. As many would agree, it is not just what is called “one more framework” and it still preserves its popularity till now.
In this article let’s try to discuss why it is so popular and why use it. So let’s focus on the major advantages of this open source application framework for the Java platform.
Following are some of the major benefits offered by the Spring Framework:
* Spring Enables POJO Programming. Spring enables programmers to develop enterprise-class applications using POJOs. With Spring, you are able to choose your own services and persistence framework. You program in POJOs and add enterprise services to them with configuration files. You build your program out of POJOs and configure it, and the rest is hidden from you.
* Spring Provides Better Leverage. With Spring, more work can be done with each line of code. You code in a more fast way, and maintain less. There’s no transaction processing. Spring allows you to build configuration code to handle that. You don’t have to close the session to manage resources. You don’t have to do configuration on your own. Besides you are free to manage the exceptions at the most appropriate place not facing the necessity of managing them at this level as the exceptions are unchecked.
* Dependency Injection Helps Testability. Spring greatly improves your testability through a design pattern called Dependency Injection (DI). DI lets you code a production dependency and a test dependency. Testing of a Spring based application is easy because all the related environment and dependent code is moved into the framework.
* Inversion of Control Simplifies JDBC. JDBC applications are quite verbose and time-taking. What may help is a good abstraction layer. With Spring you can customize a default JDBC method with a query and an anonymous inner class to lessen much of the hard work.
* Spring’s coherence. Spring is a combination of ideas into a coherent whole, along with an overall architectural vision to facilitate effective use, so it is much better to use Spring than create your own equivalent solution.
* Basis on existing technologies. The spring framework is based on existing technologies like logging framework, ORM framework, JEE, JDK timers, Quartz and other view related technologies.
So you can’t but deny the fact that using of Spring framework gives you a number of advantages. Some consider it a kind of standard for enterprise Java development. The others would argue. You are certainly free to agree or disagree or choose it or not or which parts of it you want to use and which are useless. But the fact is that it may be rather effective and give you some benefits.
And what is your opinion of Spring framework? What do you see as its advantages? Please help me to make a list of them longer!:)
Thanks for your attention! Wait for your comments!