Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm creating an Android application which will access data using a restful web application.
I have quite a lot of experience with Java, but minimal experience with PHP.
Having looked online, it is difficult to determine which language is more suitable, scalable, portable etc.
I'm hoping that the Application may one day have many concurrent users and therefore I need the most suitable option.
If anyone has any experience writing a web application in either language, I'd be really interested to hear about your experiences, and any problems you faced.. i.e. for a java web application do you need a tomcat server or another embeddded to server for it to be able to run?
Thanks, for any answers, Matt.
If you already have experience with java, I would suggest you use the following to build your REST services: http://restlet.com/
Its very easy, and efficient. The performance is very smooth. For PHP, you will have some learning curve, and also there is no standard. Mixing java with PHP is like combining a VERY STRICT LANGUAGE (java) with a VERY LENIENT LANGUAGE (PHP). So its safer to be on the same language.
Tutorials:
Official tutorials to get started: http://restlet.com/learn/tutorial/2.2/
Good step by step tutorial with screenshots and code snippets: http://java.dzone.com/articles/restlet-framework-hello-world
Short:
Take JAVA!
Always choose the language you are comfortable with. Also I think Java is better suited in the end.
PHP isn't my favorit. Most of the people like it, because it is easy to start with. (It was also for me the second (non Browser) language I touched.)
Framework Tips
WebFrontend: Play Framework
Back End&Scaleability: AKKA
JSON: Gson
Long:
Scaleability in the meaning to scale to lots of concurrent users:,
is more a architectonical issue, as a question for the right language. You can write scaleable software in any language. The difference isn't the scaleability of a language, but it could be the performance. One language will take longer for the same task as the other one. But you could always throw more Servers in, to scale out.
Architectures to consider if you want to scale out, are in my opinion message based designs. My favorite is the actor model, there is a very good framework for that in Java, the akka framework (production proved). But I think you first should get your software running. If you get enough users... scalability problems are the problems you like to have (they mean you have users).
Scaleable doesn't only mean, that you can scale to many concurrent users. But the ability, to handle the complexity of the software or can handle concurrent development and so on (your team will grow, thats also a problem to handle). In this topics Java is as clearly static typed OOP language, better suited.
Also the performance will not be as good as in Java (it is a interpreted language). But there are always options. Facebook started with PHP. In an interview one of the lead developers, told that PHP isn't that scaleable, because PHP wasn't designed for OOP. But the performance issue was handled, through writing a compiler for PHP (outputs C++). [If if find the link I will post it] .
Update the PHP Compiler is Called HipHop and it uses HHVM (Hiphop virtual machine), Facebook developed it after excessive CPU usage
You can consider looking at https://jersey.java.net/ As a web container you can use anything like Tomcat. I have used Google App Engine in the past.
To get started quickly with Java look into http://dropwizard.io/, using less EE frameworks and more standard Java.
Has Jersey for REST and is supereasy to run.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I'm starting a new web based enterprise application, and I'm thinking of using Wavemaker.
I'm a fairly experienced java-ee developer, but it seems to me that even in this case, WaveMaker still makes sense to develop the application fast and focus on the business logic.
My questions are :
1- Are their any drawbacks to this platform
2- Can I do all the normal things from the server side easily (like sending mail,building birt reports, adding jobs)
3- Can I freely manipulate javascript (for example for specific animations, using plugins....)
4- Can I integrate realtime processes, like websockets ?
Thank you
I've used Wavemaker in an Enterprise application with success. We used quite advanced features such as heavy use of backend logic based on JavaServices, an run-time SQL database selector made inhouse, JS plugins for the frontend, obfuscation etc
We later recruited a devteam to take support of this application and, although the community is small, the team learn quickly and was able to maintain the code base.
As I see it, Wavemaker is a excellent tool if you like to:
deploy a web-based CMS for your midsized SQL database
deploy a smaller web control page for your java back end system
To answer you questions:
1) Small community: Although the community is friendly and on their toes, it is too small to ensure the type of feeback you might be used to. You will have to spend quite some time banging your head to the wall when you try to go beyond the example applications.
2) Yes, you have all the freedom you would expect from a Java backend. Simply said; each REST api is assigned to a Java Method, its up to you to implement the logic. I have built wavemaker on SQL, mongoDB. With email interactions, data parsing, file upload/download etc You name it
3) Yes, you can add JS plugins and customize the scripts generated by Wavemaker. You might want to make sure that you don't edit the auto generated JS, since they will be overwritten. but as soon as you found the right entry point you are free to customize just the way you like it.
4) Yes, since you build you own back end in java you are free to open up any type of communication you like to have. And since you are able to customize the front end js you will be able to read this data. But as I said in question 1 - there will only be a small community helping you
So to sum it up:
I vote for Wavemaker, but make sure to only deploy it if you application will be similar to the templates/demo provided, if you build a unique system you might like to look into other solutions.
All choices have drawbacks. There is not a lot of WM expertise to be had. You'll need to deal with some issues in terms of the library at hand, dojo, spring etc instead.
you can,but it requires some java knowledge. You are operating in a spring MVC you can
you can, you are operating in a dojo client there
possible, probably. worth the effort, doubt it.
1- Drawbacks- It's enterprise focused platform, so will require own effort to learn it.
2- Yeah, you can do pretty much all normal things (at least from my experience, till now)
3- The tool has kind of open-source configuration so its easy to manipulate or customize your codes if needed
4- From my experience, WaveMaker has one of the best and most diverse integration options available.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
My company is in the infant stages of looking to building a team to develop a new platform to replace our existing system. UI/UX is extremely important since there are several thousand users. The current system is built in PHP with Zend.
I have been doing a lot of research and have thought about Yii with DoJo or something similar. I have also looked at the ZK framework if we decided to go the Java route. Whatever we choose the framework has to talk well with linux and be able to perform low level system operations like creating/updating files, etc.
At the end of the day I know very little about Java but the more I look it seems like all of the clean web applications are running Java.
Am I missing something here or am I on the right track thinking:
PHP = easier to train and hire people. Harder to get a rich UI
Java = harder to train and find developers. Clean UI more easily obtainable.
Choosing Java over PHP isn't much about a clean UI, is much more about the ability to grow in both size and complexity.
Don't get me wrong, I'm aware that there's a lot of big complex systems running fine with PHP, it's only that I find that Java has more support built in the platform for scalability.
You can have a clean, rich UI with both PHP and Java.
PHP - Easier and faster to get started. Harder to get around performance and scalability issues, even with proper knowledge.
Java - Harder to "get it right". If everything is done properly you'll reach performance problems later than with PHP... but with the proper knowledge it will be easier to find solutions.
But, as far as UX goes, you should go with what your developers are most confortable with. If the UX and backend logic are decoupled you can treat them as separated problems.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
When I do a job search for a .Net developer it's all mostly the same stuff .Net, ASP, SQL Server, CSS, Javascript, AJAX, and maybe C#. Whereas with Java you may have to have Java, Sturts, Spring, JSF, EJB, a RDMB, Eclipse RCP, CSS, Javascript, AJAX, Rest, any number of specific Java APIs. Is it easier to be a .Net developer since the technologies are so focused? Or does it just seem that way?
It's different, rather than easier.
The reason the Java jobs are listed against frameworks is becuase Java has tons of frameworks and design patterns ready to be used to make things easier to maintain. The design patterns and frameworks are starting to appear more in .NET now too, so expect to see jobs changing to look more like those Java jobs.
There are just as many patterns and practices in both worlds - but they are more established in the Java community (the Java employer will push them onto you, you will find yourself pushing your .NET employer).
Largely, Java vs .NET is syntax. Do either (do both!). But be aware of the patterns and frameworks as they'll really help you to write better code.
I'm a C# developer, believe me, there are more choices in Java than in .Net. The obvious advantage in .Net, though, is that in any job you land uses the same IDE (Visual Studio) and (in most cases) uses the latest .Net framework (except for maintaining legacy apps). There may be some subtle differences in different employers such as them using Enterprise Libraries, MVC versus Forms, WPF, etc.; But if you're a seasoned C# developer, you can adapt easily depending on your fundamentals.
Some developers in my field who did not learn any other programming languages tend to be lazy and simply drag-n-drop objects to accomplish tasks 80% of the time (some of them even believe that object-oriented programming is simply code with objects). If you are familiar in C++ or any C based language, you will definitely have the upper hand but that is not a requirement.
I'd suggest learn the best programming practices, never put all your eggs in one basket (even though god did that to us men), and be open to other languages other than C#. If you learn one C-based language, learning other major languages won't be as hard rather than starting with VB.Net.
Either way, both of them are well paying jobs and you won't regret if you choose either one.
my 2 cents.
Yes, with Java you have web frameworks like JSF, Struts, Struts2, Wicket, SpringMVC, Stripes, Tepestry, Facelets .. just to name a few. Every company is using different frameworks, so if you change job you will learn new frameworks. And its only web framework, what about persistance ? JDBC, Hibernate, JDO, iBatis. Who can name 5 mocking frameworks for Java? Who have used 5 different application servers? What about databases? Ive even used Informix and Teradata. I think all .NET is using Sql Server and its easier to learn one database well.
Please don't forget about the following .NET technologies: Win.Forms, Silverlight, WCF, WPF, WWF... There are still a lot of learning in .NET outside of web development. It is not easy to be a senior .NET developer, at least not much easier then Java. However, IMHO it is easier to start in .NET when you have no past development experience.
In Java world, you develop with technologies from many communities, in .NET world, you only work on technologies from Microsoft. In my opinion Java developers are more free in terms of choices of technologies, but sometimes it also brings you problems. :)
Java itself has more fields coming into it; I mean, Java developers have now more opportunities than any other technologies in the market. They are being hired at attractive compensations to develop different java-based applications, software and games etc. It will continue to be increased in future as well. Just stick with JAVA :)
Let's line up the technologies you mention (and some you don't). This will necessarily be somewhat imprecise so will be a nitpickers paradise :)
.NET Java The overall encompassing technology
ASP Struts A Web development framework
JSF
(.NET BCL?) Spring An application development framework
EJB
SQL Server an RDBMS A database
(VS) Eclipse An IDE
CSS, Javascript, AJAX, REST are all technologies common to both stacks.
The technology concepts you have to learn are the same whatever stack you choose - it's just the names are different. The .NET ones will all be 'Microsoft Blah Blah Blah', whereas the Java ones will all have funky cool names...
Something else important to consider is that you can get "branded" as a .NET or Java developer midway into your career. At that point, it becomes more difficult to switch, since (understandably) you have less experience in the one you didn't choose. Thus far, I have been alternating, but that comes with its own set of problems where you have gaps in experience with new libraries/frameworks on each side.
Any other thoughts on the pros/cons of developing Java vs. .NET? For instance, what types of companies, cultures, pay, etc?
For me, it seems like .NET tends to be in more established companies whereas Java is used by a lot of startups (given the low cost entry and open source libraries available). The pay is comparable, but .NET seems a little higher. Java development might be a little more fun given that you get to play with new frameworks more often and aren't as restricted to specific paradigms.
In talking with my .Net pals, it seems like getting started on something pretty standard is easier, because most people do things the Microsoft way. Java's large number of choices means you have to pick libraries and toolkits at many different levels. The upside for Java is that when the official or common way doesn't suit you, there are a lot more options available.
In practice, I don't think it makes much difference. Any single Java shop will generally settle on one particular thing. E.g., Struts or Spring or JSF, not all three. Hibernate or Ibatis or pure JDBC, not all three. So I think there's about the same amount of stuff to learn, in that whether you're using a Java stack or a .Net one, you're still solving roughly similar problems.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I come from a Java and PHP background to build web applications.
Has anyone used Lua before to build a web applications?
Question: If so, what are the pro's & con's of using Lua versus PHP or Java for a web application? (e.g. web server support, performance, code maintenance, etc).
As others mentioned Lua is "do it yourself" kind of environment. Also it is very fast and quite memory efficient compared to Perl/PHP/Python/Ruby especially if you are using LuaJIT. And it is very easy to integrate with C/C++ code. Usually these points are irrelevant for a typical web application where performance is usually restricted by database. Also where you don't really care about C/C++ integration and where you don't really want to do things yourself but rather you want to build on top of existing frameworks. For this reason I don't think Lua is a good fit for a typical web applications. At the same time there are some niche applications where Lua shines. For example our company specializes at building high performance HTTP servers used for adserving. So what we are using is our own HTTP server written from scratch in C++ which integrates Lua as a scripting language for our business logic. This allows us to do customization of the business logic in Lua quickly compared to what we had to do if it was pure C++. At the same time we always have an option to do performance critical parts in C++. If we were using any other scripting language we are positive it would be slower, it would use more memory and generally would be harder to integrate with C++ code. At the same time we don't really care much about loss of extensive library support were we using other scripting languages as the domain we are working in is quite specialized so usually those libraries are irrelevant for it anyway.
I am using Lua right now to build a web application! Whatever happened to software developers that "do it yourself" got a bad name - too lazy, weaned on bloated megabytes of support libraries, or what? In reality, as others have pointed out, there is decent support, just not on the scale of Python, say. Lua is by far the fastest scripting language (especially with www.luajit.org around), and much, much cleaner as a language design than any other in its league out there. This is vital for long-term maintenance.
For those using lighttpd as their webserver (me included), the added bonus is that the full power of Lua is available for mod_magnet scripts, useful for synchronous request handling/rewriting-on-steroids.
I have programmed a few websites with Lua. The first one was a raid planner for my World of Warcraft guild (that's often how you start programming in Lua...). I used mod_lua with an alpha version of Apache 2.4 for that. Two others were small contests sites for customers, developed with WSAPI, Nginx, Spawn-fcgi and Orbit. This setup is damn fast, faster than mod_lua and anything else I have seen. The pages would display instantly as if they were in cache ! The experience was very pleasant and Lua makes you quickly productive. But you better be well organized. Lua is missing a lot of batteries when it comes to web development, so you often have to implement your own and it can become messy. So I suggest you plan what you will need before you start. I used my own Lua "ORM" with MySQL and a forked version of Lua Pages for the templates. Have a look here if you want to give Lua+Wsapi+Nginx a try : http://mascarenhas.github.com/2009/10/24/wsapi-nginx-fcgi.html
I think it is the best setup.
There are quite a few projects using Lua for web development.
For example, Nanoki, an HTTP and wiki engine developed in pure Lua.
Or Sputnik, which is build on top of Kepler.
That said, Lua is very much a, hmmm, "do it yourself" kind of environment.
Pros: fast, small, elegant, easy to make your own binding to a C library.
Cons: sometimes you have to write your own libraries for things you would get for free in Python.
http://luanova.org/ has a number of good posts on web development in Lua.
We use lua with great success for our backend implementation. You can also have a look at JUCI webgui for embedded devices. It uses lua for backend implementation. You can have a look at how code interacts with lua/C backend: https://github.com/mkschreder/juci
Note however that this backend is a pure jsonrpc backend so it does not create any html like php or cgi pages. Lua is perfect if all you do is handle and respond to json requests. You can also have main application in php and use lua to write the application on the backend. Or main application completely in javascript.
I think that if you are going to use lua in places where you want to generate html then you will find it lacking many features, but if you limit it to purely functional backend implementation then you will find that it works very well.
lighttpd and mod_magnet are really great platform, but I recommend that you first take a look at Kepler Project. It's a quite great beginning.
You can take your PHP/Java background useful.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Now that frameworks like GWT, Morfik etc exist which compile Java client side code into major JavaScript dialects, is it still worth learning JavaScript?
In my book, yes.
I'm a strong believer in understanding the underlying technology beneath whatever toolkits you're using.
Abstractions are leaky - you'll run into trouble down the line if you try to get away with only understanding a high-level toolkit, and not the underlying technology. Sooner or later you'll need to debug your project at the JavaScript (or whatever) level.
Understanding the technology behind your framework reduces the time spending on debugging the things you do with your framework. so in my opinion it's always good to know whats going on behind the scene.
Yes,
...and I speak with experience: I've never learned javascript and only used parts of it, when I encountered it in google searches for questions.
Now that I'm building a Web application, I notice that not all abstractions away from javascript have the desired functionality, and I need to go into javascript to solve it.
I notice that I miss the fundamental knowledge I have with other languages, just like I miss the 'javascript programming language' book (I'm not sure it exists but I have similar copies for C, C++ and Java). So today I ordered Javascript:The good parts and I will learn it...
ABSOLUTELY. In my opinion, abstraction is important, but knowing how that abstraction works is equally as important.
I've seen developers who live and die by their frameworks (javascript: jquery, yui, etc... or php: zend, cake, etc...), but have no clue how to do anything productive without them.
Who would you rather be (or hire)? The guy who knows how everything works, but improves his productivity by using frameworks and libraries... or the guy who uses these resources with no idea how they actually work?
Stretching this further...
Should you learn assembly language nowaday with so many higher level languages?
Should you learn how to do basic arithmetic like subtraction and addition by hand when now we have calculator and computer that can do this for you?
Well, I'd say maybe you won't need to if you don't have any reason to go deep down, but someone will have to still.
As with all things, there is a balance. Know that it will be to your disadvantage if you don't know the lower level stuffs, but sometimes it is necessary to skip it so you can be deep in something else. You have to admit there are so much technology out there that you won't be able to be an expert in all things. In that case, knowing someone else who does is a good thing.
So pick your choice and go with what interest you. If you think you are interested in learning JavaScript go for it. If not, you can stick to your level of abstraction and get a JavaScript buddy that can help you when you are stuck.
I think the reality of browser bugs will make being able to diagnose and understand the generated JavaScript necessary for a long time. I worked with a Spreadsheet company for OS/2, and they had to read the generated assembler from the C++ code because the IBM compiler would generate buggy machine code at times. So while they may not have known enough Assembler to write a whole project in it, they certainly had to know enough to track down problems.
That being said, there are also many web frameworks that require you to code your own javascript, and a given toolkit won't necessarily do everything that you need to do without directly writing some javascript. You can choose frameworks that avoid it if you prefer, but it isn't at all obvious that, unlike say Assembler for application development, the Web development community has decided to abstract away any involvement with it. You may well end up on projects that need it.
Actually, drawing a parallel to assembly language is a bit missing the point. Assembly was platform specific and the move to C enabled a certain level of platform agnosticism, allowing the developer to be more productive on multiple platforms. Hence, there was a real productivity effect.
Learning all your rich web chops on something like GWT is more limiting. It is, after all, based on Java, and the web is way larger in scope than just Java. You'd be seriously limiting yourself if all you know is GWT but not the inner workings of the generated Javascript (Can't comment on Morfik as I don't know it).
However, employing something like JQuery in order to be more productive when coding Javascript is much better. JQuery can be used on any browser running on any OS, so it doesn't limit you.
I'd say yes. I've met people who claimed to know javascript, when all they could do is do a couple of jquery function calls. Javascript (ECMAscript) is a beatiful little (ok, not so little) language.
Abstracting a bit from javascript - define "worth learning". This kind of thinking was always a conundrum to me. Are you, per chance, afraid of learning something new?
I guess, this kind of thinking is what really separates a coder from a programmer.
A web developer who does not know Javascript is like an auto mechanic who does not know how to change a tire.
JavaScript is the core of interactive client-side development. It is absolutely essential. After you know JavaScript you might decide to try out other things that compile to JavaScript if you find them easier.
Also if you want to work professional in web development for some company then you are going to have to know JavaScript. Besides, JavaScript is getting more and more popular as the execution of the language in the browser gets faster and as it becomes more popular in Server-side development as well.