I'm a highly skilled Java dev contemplating learning iPhone development. Mac only dev aspects aside, how much of a leap would learning the mobile application stack be? Sure I understand that its closer to C in how one should approach it, and with that comes memory management and so on.
My queries would also include
How well is OOP/OOAD supported?
Is there some API(s) which enable unit testing?
I'd encourage those who answer to quote external sites and references to help elaborate the detail
The development language is Objective-C, which is pure C with a very thin object wrapper over the top. They syntax is kind of weird looking, but it's pretty easy to get to grips with if you know C once you get over the message calls - myself I have a solid C background and only started picking up Objective-C a month or two so back but I'm finding it really rather pleasing - more so than C++.
The difficulty you're going to have if you have only coded Java is pointers and memory management. Memory management isn't conceptually hard as it's simply (!) a question of keeping track of what you are allocating and releasing, plus XCode seems to come with good tools for detecting leaks (although I haven't used these in anger yet) - and as iPhone programs are relatively small it's not like coding a big system program where this can be extremely tough. The major conceptual difficulty you are likely to have is simply getting your head around pointers as they are used extensively (as in just about on every line of code) and you do need to grok these completely. One of Joel's reoccuring themes on the podcast is the difficulty some coders get using pointers, so I'd recommend you take that carefully and possibly pick up a good book - perhaps the original K&R.
Someone may like to correct me, but although the Cocoa API appears excellent, there seem to be few libraries available outside the framework (unlike C++ or Java). For instance I had to add my own queue and stack classes - although the NSMutableArray makes that extremely easy.
All in all though I'm certainly finding it one the most fun platforms to play with I've used for a while.
A few months ago I was a Java web programmer who hadn't touched C since college. Now I've got one iPhone app completed (for my day job, stuck in the bureaucracy there so it's not in the app store yet) and my second app nearing completion.
To answer your question the biggest hurdles are understanding the conventions (Delegate pattern, Categories, etc.), getting a grasp on memory management, and working with XCode (a good IDE but definitely steps behind Eclipse and IntelliJ).
I also think the documentation in the Apple Developer Center website is well-written, and a good developer can get up and running quickly.
To more specifically answer your question, I haven't tried Unit Testing yet but I think the OOP is great - my domain objects in my iPhone apps are as robust and powerful as those I've written in Java.
I came out of college as Java developer. My first (real) job was Mac Development. Transitioning from a language I know (my starting point was Java) to something like Objective-C was fairly easy, code-wise. To maximize your time developing iPhone / Mac Applications, you have to make use of XCode and Interface Builder. Once you get the hang of attaching events and GUI outlets (the objects your UI want to communicate with), you'll be set for normal iPhone app development.
Here are the steps I went through learning Objective-C (the programming language for iPhone development) having my Java background:
Learn the basic OC object-oriented concepts. Subclassing (Inheritance), protocols (Java Interfaces), object properties (Bean properties), methods (you have to explicitly indicate the "parameter entry" labels, unlike in C / C++ / Java where you guess the parameter ordering).
Understand the difference between Objective-C, Cocoa, Aqua, and C. Then learn about how to use frameworks. Frameworks are pretty much the same as Java Packages.
Familiarize yourself with using these Foundation classes: NSString, NSArray, NSDictionary, NSSet, NSURL, NSAutoreleasePool.
Study more about Interface Builder. I thought before that the Visual Basic way of programming limits the programmer. I was wrong. It is better you "visualize" the app first before you get the hang of how things go in it. Take note about the keywords IBAction (analogous to making an EventListener), Outlets (you only have a few objects "exposed" for your UI elements), Views (UIView in case of the iPhone, everything that's "visible" in the application can be considered a "view"), and Controllers (there are ready-made controllers that you could use to populate Table Views, flip Card Views, etc.).
Learn how to deploy your app through the iPhone Developer Portal. You cannot send any iPhone app to any device if you don't have this "right". Yeah, I know it sucks, but you have to go through this process, anyway, if you want to sell your apps.
BTW, you could use the following for unit testing iPhone code: iPhone Unit Testing
Hope this one helps. :)
Objective-C is an object oriented language so, as far as OOP is concerned, pretty much anything you can do in Java you can do with Obj-C.
I don't have any experience with it but here's at least one resource on OCUnit, the objective-c equivalent to JUnit: http://developer.apple.com/tools/unittest.html
The biggest problem I'm having with the transition is definitely the memory-management aspect. Learning the syntax and APIs is pretty straight forward but life's tough without the GC!
EDIT: Oh yeah, the second biggest problem is XCode, the IDE used for Mac/iPhone development. Refactoring support is minimal and I find it a pain to navigate between files. Expect this to slow you down quite a bit, too.
For unit testing there are a few options, OCUnit was linked above. There is also google-toolbox-for-mac.
The OOP in objective-c is good, fairly clean. You will encounter old school C functions on occasion as well.
The API used is called Cocoa-Touch, and is built on Cocoa, which was built from NextStep, so there is a great history of design and refinements out there.
No garbage collection on the iPhone. The golden rule is "If you alloc, then you release". There are plenty of questions on SO regarding memory management, so I won't go into details here.
The major hurdle is the design / architecture differences. iPhone apps and java apps are build using different conventions. So consume as much objective-c / cocoa / cocoa-touch code as you can find / stand.
Spend some time working with Interface Builder, it can be aggravating, but that usually means your not understanding what its up to. Once you have a clear view of how IB works, and what it can do for you, you will really appreciate it.
Cocoadev.com is a handy resource for picking up design and code examples.
Cocoadevcentral.com has an excellent collection of articles, including desktop cocoa development. His learn objective-c article is one of the best you will find.
Get an Apple Developer Connection account if you don't have one yet. You don't have to pay for this one, but will get you into the documentation and tools.
ADC iPhone
iPhone Reference Library API Docs, guides, sample code, The official Apple stuff.
I wouldn't say that I'm an expert in any language but I'm competent in a few. Most of the code I've written recently has been "enterprise"-type stuff.
Assuming you're comfortable learning a new API and language, the biggest difference I found is how constrained the iPhone is in terms of CPU performance and available memory. I'm very used to trading off a bit of memory for better performance -- almost unconsciously -- or being a little wasteful because I've got eight cores at my disposal. That's a really bad idea on the iPhone!
The other hard thing is making sure that it's iPhone-y. Making a good app is not just a matter of shrinking the GUI down, you really need to think about presenting the data effectively.
The technical aspects are all pretty much sorted. The unit test side is less advanced than on the Java side. On the other hand I find that I can be much more productive and less error-prone in Objective C than Java, and this is probably due to the object model which is quite different (you tend to delegate rather than inherit).
Well, Java was based on Objective C and Smalltalk, which are object oriented languages. The big issues will be syntax (which is not entirely C based like C++ and Java), pointers and manual memory management.
This is based on some very old Objective C knowledge, but I do know that when I switched from Objective C to Java (around 2000), it was pretty easy since the underlying concepts were pretty close.
Based on Objective C
Memory management
It is worth mentioning that you can use C++ and C++ objects within your Objective-C code, often referred to as Objective-C++. This can be a valuable approach to separating your data model and other platform-independent code (written in standard C++) from your UI code (written in Objective-C using the Cocoa framework).
If you understand the idea of OOP through your Java experience, and if you have a basic idea of what pointers and memory management are, then the last obstacle in your way will be the alien syntax.
Syntax: I found this tutorial, among others, very clear and concise. In my mind, I conceptually mapped Objective-C and Java infrastructure, which you can do for the most part (i.e. a message is for the most part a method, a protocol is an interface, and so forth). Once you get over the initial shock, you will find that Objective-C development for UI applications can be rather intuitive and pleasant.
Structure: I don't program UI so much, so I found that I needed to get a better grasp of the MVC paradigm.
You may also find some cool language features, such as categories, that you wish you had in Java. I likewise find the lack of some other constructs, such as the lack of static members.
Related
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...
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 3 years ago.
Improve this question
We're starting to think about the next stage of our company information strategy.
At the moment various departments have Delphi VCL applications that focus on the information that they manage about their Projects. Behind the scenes we've been making sure that the thinking joins up.
We're now at the point where we want to give people the opportunity to browse all the information the we have on either a Project-by-Project basis or search aspect.
We think it will be a web based interface (at least intranet) but are stuck on what to write it in!
Options seem to be Java, PHP or Ruby. Any of the above will involve us learning a new language (no budget for new hires) so we're looking for guidance
You should understand the pros and cons of as many languages and frameworks that you can. I happen to know all three (PHP, Java, and Ruby) and have written many applications in all of them (plus others), but I drastically prefer Ruby. I'm not sure I would appreciate Ruby as much as I do if I didn't have experience in other languages.
Why learn a new language at all? Since you're Delphi developers already, use Delphi. It has VCL for the Web (formerly IntraWeb), which gives you the ability to create pretty good web applications with almost the same functional capabilities as a Delphi Win32 application. IntraWeb (under either name) works like you're used to, right in the IDE, and lets you write Delphi code just like always. It's a viable web solution, especially for shops that have lots of Delphi code already; much of the business logic can be used as is, if it's not tied to the GUI.
You didn't mention what version of Delphi you're using, but there are demos of VCL for the Web or InterWeb in both Delphi 7 (%DELPHI%\Demos\IntraWeb) and Delphi 2007 (C:\Documents and Settings\All Users\Documents\RAD Studio\5.0\Demos\IntraWeb\Win32 on WinXP). Delphi 2009 puts them in yet another location (C:\Documents and Settings\All Users\Documents\RAD Studio\6.0\Demos on WinXP). I'd start with the Features demo regardless of where it's located on your version of Delphi, as it gives a good overview of the capabilities.
Disclaimer: I am in no way affiliated with IntraWeb, VCL for the Web, or CodeGear/Embarcadero. Just a Delphi user since 1995.
I don't believe that there's any huge advantage in either one for what you are trying to do. Plenty of people here will support each option (hopefully without a flame-war).
As none of them are familiar why don't you try creating the same tiny prototype in all three and see which you prefer? Your best option is to pick a framework from each and base your efforts on those eg. CakePHP, Ruby on Rails, GWT etc.
By far the biggest hurdle you're going to face is learning about how to build web applications whatever technology you pick - the paradigms are quite different to a traditional thick client apps and while this isn't insurmountable I'd recommend hiring somebody with a web-app skill set if only to get you up and running.
Coming from a Delphi background you'll probably feel more comfortable with Java as a language but I've managed to avoid PHP and not used Ruby so can't really give a fair appraisal.
What I would say for Java is that once you've got the basics of web development down it's incredible powerful, allowing you to build code in a structured way with distinct layers and separated concerns.
There's also a huge wealth of open-source APIs, which these days allow you to focus on the business problems, simply picking and choosing libraries that support your solutions. Also throw into this mix the support for automated testing and you've got a powerful combination in Java.
Although I don't particularly like the language, PHP is probably the easiest to learn. Ruby would not be far behind, although I have no experience with it.
Java, although I love it, is extremely difficult when it comes to setting up and maintaining a web interface. Too many intricacies with XML files, JSPs, Java files, ...
Of course it's all very personal, but PHP doesn't have a steep learning curve like Java with its related web technologies.
After installing, you can get productive almost right away, even if you hardly have any previous knowledge of the language. I think that's once of the main reasons for PHP's popularity.
create a new file with notepad
type: <?php echo "hello!" ?>
save as hello.php
now access it as http://www.yourserver.com/hello.php
And you'll see Hello!
That's it.
The web is full of examples and documentation, and it's really easy to integrate PHP with databases like MySQL. I oftenly use MySQL as the glue between my Delphi applications and websites.
Ruby (on Rails) is quick to learn and it has great community support. Now that I've become comfortable with it, I would not write a web app in anything else. My only negative experience with rails is when DHH rejected my friend request on Facebook - c'est la vie. ;)
The hardest part of web development is the new paradigm. The next hardest part is picking the right framework. I would add two languages to your considerations:
Python (with Django)
ASP.NET
In many ways the Microsoft stack will certainly take a lot of potential mistakes off of your plate, in that it gives you a lot of the framework decisions in a nice package. Of course, you may not like the whole package. Ruby on Rails is kind of the same thing in that respect (giving you the package, that is, but not as much as Microsoft).
But regardless of your choice, the just as important (with the exception of PHP since it is a web language to begin with) is the web framework.
And an important driver in your decision should be the size of the project. A small project won't shoot itself in the foot too bad even on poorly written PHP, but a very large project can certainly get very messy in a dynamic language when everyone is learning it for the first time. It depends on the type of team you have.
given the options, i'd go for ruby ... mostly because it is such an extremely beautiful, powerful, expressive, consistent and radical language ... you can get a very good introduction here ... plus ruby-on-rails and merb (which are united in rails 3) are very productive environements/frameworks to develop apps ... i personally don't know anything which is so suited for fast developement of server driven applications ... also ruby is very good for scripting ...
there are many things i dislike about PHP and Java, but let's not get into details ... my main accusations would be, that Java is quite verbose and bloated, and the most used frameworks even more so ... and PHP has a terrible API design and quite a lot of semantical inconsistencies, even some syntactical, although most of the latter are getting resolved recently ... plus, it is not very fast ... and also, you get many downvotes on stackoverflow, when you critisize one of the languages ... :D
however, a reason to use Java is the massive ammount of tools available (allthough only a part of them is relevant for the web) ... when it comes to PHP, the best thing is deployment ... it's very easy to get PHP running on a server ... and most servers have PHP anyway ... so if you want to write software, that can run on many servers, PHP is the best choice ... if you decide to use it, do yourself a favor, and use it only with a proper framework/environment, as Flow3, Zend, synfony, codeigniter or CakePHP ... PHP makes it easy to hack together some code (i'd even dare to say it was kind of designed for that) ... but you'll quickly regret that you relied on that ...
the microsoft stack was already mentioned as a possible alternative ... up to you to decide ... it's good, but expensive (licenses make scaling much more expensive) ... and IIS has relatively much downtime compared to other servers ...
personally, i'd suggest you use Haxe ... a very nice and expressive language, that allows you to compile to
AVM1 or AVM2 bytecode (virtual machines for flash player 6-8 and 9-10)
neko bytecode (neko is a very fast and lightweight virtual machine, suitable for writing web servers, daemons or desktop apps)
JavaScript source code
ActionScript 3 source code
PHP source code
C++ source code (using neash, you can use flash player API with C++, most notably the display/graphics API, which is very easy to use)
Java source code for android (currently prealpha, but demo looks good) ...
you use a single language to
write servers (be it HTTP or TCP)
create rich clients (be it javascript or flash)
target smartphones (either flash smart phones or iPhone through C++ (well, still not optimal, but progress is being made) and, in near future, Android ...
build desktop apps
on top of that Haxe is an open source community driven language ... plus of course Haxe has a very consistent OO API design and provides many cool languages features, such as high order functions, parametrized enums, generics, and structural subtyping ... and if you decide to use it, be sure to check out haxelib for helpful frameworks/libraries ... ;)
I think you should choose between Python or Ruby. Both have similar capabilities, with relevant frameworks. I think it's largely a stylistic preference, so you should spend time looking at the syntax of both languages.
Since you weren't initially considering Python, check out this video on the Django framework: http://video.google.com/videoplay?docid=-70449010942275062
From a pragmatic standpoint, Java probably has the most power and flexibility, PHP is probably the most widespread but tends to encourage bad coding if you're not careful (I have yet to see a PHP app where I said "Wow, this code is pretty"), and Ruby/Rails is easy to learn and really fast to develop on, but everything is pretty much decided for you (not necessarily a bad thing) and when you step away from the "Rails" way of doing things, it can get messy.
If you're looking for easiest transition from Delphi, consider Flex.
It has the same RAD interface-builder that you're used to in Delphi, it's backed by object-oriented ActionScript and since your site is internal you can mandate using Flash on all client computers.
Besides, Flex rules. Really)
Going from Delphi world to web world? Use C#, since there is a spirit of Delphi in C# (all right, this spirit is Anders Hejlsberg). When learning C# I found a lot of concepts similar to Delphi.
I am new to Web Programming and I hear that there are many biggies like Java, .Net and PHP for Web Application Development.
I would certainly appreciate if I can get some insights on how this technology stack up in comparison and in what scenarios one would prefer one technology over the other.
Thanks for all guidance in advance.
PHP has low resource requirements, really cheap hosting, really low barrier to entry and is the most popular Web framework bar none.
That being said, PHP is a purely interpreted language (opcode caches notwithstanding) so tends to be slower than Java (not that that usually matters), the syntax is inconsistent and it's easy to make huge errors (like not sanitizing database query inputs; but you can do that in any language).
Neither is better than the other. For casual Web development I definitely prefer PHP most of the time. Java is probably better for more "enterprise" type software.
This is just my opinion:
PHP is a great language for building the web pages themselves. It is relatively easy to learn. And it is very easy to combine the static HTML and the custom generated one. It is quite powerful. For example, Wikipedia's MediaWiki is written in PHP. It is also straightforward to access databases. But in the end, it is essentially a scripting language.
It's hard to write maintainable code, and complex logic (e.g., a lot of calculations, algorithms, etc.) is not very natural in PHP.
Java is more of a "serious language". It can do a lot of things. Including web. However, creating the HTML is more "painful" and less natural than in PHP. Java shines, however, where there is a lot of smart logic in your program. There are also advantages to writing in non-scripting languages. And of course, if you know Java, you can use it for a lot of things.
.NET is nice, but generally restricts you to windows platforms, and the best tools are not free (unlike Java). I would only go into .NET if your local job market has a lot of .NET jobs, that changes a lot from place to place.
Also, PHP jobs generally pay less than Java/.NET jobs and seem to have a lower reputation.
If you're new to web application development, make sure to give Ruby on Rails a try as well. It's a joy to work with compared to Java and PHP (I've worked with all 3). It's fast, common tasks are very easily accomplished and the community is huge and vibrant.
One thing to look at when making your decision is how you are going to host your web-app. If you are looking to host it somewhere cheap you will be limited to what you can use, most likely things like PHP or ASP. If however you are willing to spend more money (or host yourself) you can get more control over your hosting and therefore make use of more technologies.
I have fairly good control over my hosting package but I have stuck with PHP because I found it easier to get to grips with having not really done anything like it before.
I agree that the barrier of complexity to entry for php is lower, so on average you probably get more supply (php programmers), more demand (php type jobs), at a lowered-by-competition price (lower job salaries on average).
From a starting web-programmer perspective, php is good because you can use it in so many ways, html + a tiny bit of scripting, extensive procedural programming, OOP, and even something resembling functional programming. Since the web is so easy to get an audience for your software, you can really keep learning while you're doing. Php is what let me break into programming, which I don't think I would have managed if I were working with a language less tied to the web. After a good 6 years, off and on, I've got myself to the point where I'm comfortable with php as a job, but am looking to personally break from web programming to off-the-web programming (trying to get into clojure) and different languages. After all this time, I've become more and more aware of the often-lacking-security and the filled-with-legacy-functions nature of php.
The php language itself has a huge base of relatively high level functions built in that match tasks that people have done in the past, so you can get some complex concepts distilled into simple functions, even before you go messing with the many choices of libraries that are out there. So you can pretty much work with a huge body of code out of the box on most servers.
So it's an enjoyable way to break into web programming and build up your body of knowledge, a great jump-off points, though not such a specialized language that you can rake in the dough without a lot of work. From a hiring perspective, it's probably pretty easy to pick up a kid off the street who can write a quick web-app in php (that probably describes me a few years ago), but much harder to get someone who will write code that will be maintainable in five years.
Oh, and one more thing: doing programming needs source control, so get to know git and github.com or gitorious.com. It's hard when you first start to get into it, so cheat and use whatever tools and aids you can, but it's so worth it to have the freedom of being able to write whatever kind of programming you want.
The git website about git:http://git-scm.com/
Github guides on git: http://github.com/guides/home
It'll open up how you work and prototype.
People make a good point about the inconsistencies of PHP. However there are numerous frameworks available that alleviate a lot of the problems of 'vanilla' PHP. So the low barrier of entry + huge community + numerous frameworks = the best web programming language IMHO.
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.
I'm trying to learn Java but it just seem like there are too many parts to put together.
You have JSP, Java EE, Java SE, Java ME etc....
I can get Netbeans to do basic but just taking a peek at spring framework it seem like a lot of work to get it to run in the ide from the numerous configuration .
I want to get into web programming and maybe mobile.
Any advice?
Another programming language?
Is java this complex or does it get easier?
Java as a language is certainly not too complicated. J2EE in its entirety is only just about feasible for a one-man team - but you rarely need the whole of J2EE.
It's perfectly reasonable for a one-man team to implement a medium-sized web application. I'm not saying one person could write GMail on their own, but you shouldn't be too scared of the technology stack - find the bits you actually need and concentrate on those. On the other hand, that in itself takes a fair amount of experience - I wouldn't really want to be starting off on an enterprise app (even a small one) on my own as a newcomer to Java.
Start small. Learn the core (the language, IO, collections) - and then start with small projects. Work out whether you want to be in mobile, desktop, server or whatever - don't try all of them simultaneously. Gradually you'll build up your experience.
It's not that Java-the-language is complex, it's that vast libraries and frameworks exist that can help you do your work. This is true for many programming languages. Look at CPAN for Perl, for example. What language to use depends in great part on what your goals are.
You can start simple and work your way up to larger and larger projects.
Java is by no means too complex for a one-man operation, but learning any form of full-formed web programming is a lot to learn when it's all new. If you were looking at .NET for the same purpose, there is a lot there too.
Unless you are doing huge-enterprise applications, ignore all of J2EE except for JSP and JMS and a very few other components. The lion's share of J2EE is only useful in the context of an enterprise application that needs to scale, and in fact can be harmful when used in smaller applications.
The frameworks such as Spring, Hibernate, Apache-*, Web Services, and so on help you do your job, but are yet more things to learn to do your job. There is a lot to learn.
Should you use Java? Well, quite a lot of development is done with LAMP (or WAMP): Linux (or Windows) + Apache-HTTPD + MySQL + PHP. With this, you don't need to worry about Java or .NET or any of those frameworks. LAMP/WAMP works very well for a wide class of applications.
Java and .NET on the server are (sort of) more appropriate for larger services, but once you are familiar with them, they work just fine for smaller services as well.
You have to decide what your exact goals are, then look at how people have implemented the kind of thing that you're looking at doing. This will help you figure out what technologies are the most necessary for the niches you're looking at going into.
Java -- the language -- is one of the simplest strongly typed languages in existence. Vastly simpler than C++ or even its close cousin C#, I would argue.
The standard APIs/libraries really are huge, but nobody learns the whole thing. You're suffering from the intimidation all beginners feel when they look at something that big and new, but this will pass as you just do stuff. First, you need to learn the standard utility stuff -- the collections in java.util, mostly -- and then, for basic web dev, probably next the JDBC library and Java Servlets and JSP. And that's it.
As an alternate tact here...
Another problem you will encounter in Java is Choice. You have a LOT of it in terms of frameworks and technologies etc.
My best advice is search around for about a day if you're so inclined to find what technologies attract you, or who's arguments sway you. Then, pick one. ANY one. Really, it doesn't matter, especially for a first project. They all have learning curves, they all have strengths and weaknesses, they all have fans and foes.
The key though, is once you have chosen, STICK WITH IT. You will inevitably stumble upon some problem, you will pose this problem to someone else, someplace else, and they will say "oh, you should have used QED instead of KnifeForkSpoon". And you will second guess yourself, go off and hear about the wonders of QED, and all of the kittens born under it and hungry children fed by it. If you succumb to that siren song of "greener grass", your project will flail. (Not fail, flail.)
Don't be wooed, don't fall for it. Just fix your problem and move on. At the end, and you're on a new project, THEN go and look for the more bestest greatness silver bullet.
As an aside, if I were just getting in to web programming today in Java, I would humbly offer this simple recipe:
JSP 2.0 with JSTL for markup and presentation
Stripes or Struts 2 for logic (note Struts 2 (TWO), Struts 1 is plain evil)
"raw" JDBC with a database pool for persistence
Tomcat or Glassfish for a container (tomcat more popular, GF easier to use out of the box)
Netbeans or Eclipse (NB is easier to use out of the box)
This uses the most fundamental, yet functional facilities for web apps in Java today, lots of applicability, and solves the major issues of a web app without covering them up with thick, impenetrable layers.
You will learn a lot using these "crude" tools.
You need to learn to pick your battles. Covering the whole J2EE is a massive task and, for most, unnecessary to begin with. I think a common mistake for beginner programmers is that they think they need to learn everything. You'll find your time much more productive if you focus on the core language constructs to begin with, and focus on either web or mobile programming.
You'll be extremely surprised (and pleased) at how much you can carry over from one area to the next. Once you know the language, the different libraries for different platforms are just tools...Stick with Java. It is a good language to learn.
Can I take "get into web programming" to mean that you're just learning web programming in general? If that's true, if you have the time you might consider setting Java aside temporarily and giving LAMP/WAMP a closer look as Eddie suggested. (Though I'd personally use Perl instead of PHP. PHP is sexier resume fodder and lets you do some very cool things on the front end, but in my experience, when it comes to writing server-side code Perl simply blows PHP's doors off. And I've heard that the HTML::Mason extension puts Perl on pretty even footing with PHP's front-end niftiness, but I haven't used it myself.)
I've made a living writing writing web apps in Java and web apps in Perl. I'm fond of both languages, but as a learning tool, I'd put Perl well ahead of Java. As you're finding out, Java's a bulky bastich. Part of that is, as others have mentioned, a function of Java being a mature language with a variety of extensions that are unlikely to apply to your immediate needs. But even stripped down, you'll still need to deal with quite a bit of overhead before you can even get your first "Hello World" web app to run. Comparatively, you'll get rolling much quicker with Perl.
(In fact, Java tends to be pretty verbose in general compared with other languages. That's not necessarily a bad thing; my one big complaint with Perl is you often encounter code that leverages various shortcuts and side effects to do an unholy ton of work in just a few lines. This code is often brilliant, elegant, compact, and utterly bloody unintelligible to a non-expert. Terseness is not a virtue for the poor idiot who has to modify code six months after it was written -- especially when you wind up being the poor idiot in question.)
And as a way of learning web programming, Java's sophistication can actually work against it. As a professional, I'm glad Java's web-based tools automagically take care of a lot of grunt work for me, like session management. But I didn't completely understand what it was doing until I was thrown into a Perl-only environment and had to deal with all that stuff myself.
I guess it depends on why you're doing this and how much time you can devote to it. If time is limited and you're looking for something that will appeal to prospective employers, then yeah, Java's an excellent choice, and you've gotten some solid advice in this thread about how to get started using it.
But if you do have the time, I highly recommend giving old-school Perl/CGI programming a sniff. It ain't a particularly marketable skillset anymore, but you'll learn things worth knowing.
You don't have to learn all of Java and its libraries. Just learn what you need for the job at hand. You will find there are plenty of options, but you don't have to get the best option every time.
If your base programming concepts are clear no
language should be difficult for you. I have switched over from vb 6 to java to c# to objective c now. What really makes a coders life easy is the IDE, debugging tools, documentation and lot of blog posts which google can search :-) regarding one man team my personal view is I am at my best when left to code and research alone with the help of google and stack overflow ofcourse :-) so I do think in programming large sized teams often lead to more screw ups than results
Java is not a complex language, altough it looks frightening at first.
I started learning Java from home, not a school, at 15 years of age (yes, yes, I know that's nothing to brag about) trough a book. It's a norwegian book, so I won't link to amazon;)
After reading/hacking trough half the book I found out I was better off ditching the book and looking for more stuff online. Google really IS awesome!
I would often read about all the fancy features of the JVM, frameworks, third-party libraries, JSRs and so on, and how much better my life would be with them all, but I just ignored them all. Yes I tried, but found it too confusing to learn Java and a framework that wasn't really necessary, at the same time.
Some people gave me hell for not using insertRandomLibraryName() or insertFancyFrameworkName(), and told me all about how much time and effort i would save, but I'm glad I didn't listen.
Now times have changed, and I still learn new things, or easier ways to do old things, every day. And I'm glad I took the time to learn the language itself before all the fancy stuff.
Also, don't use a notepad for writing code, use an IDE from the beginning. The only one I've ever really used is NetBeans, so that's the only thing I can recommend, but I sure am really happy with it!
As to Java SE, ME and EE, start with SE, and you'll propably find that it's enough for now. You don't have to use EE to write for the web, SE is fully capable of webernet stuff;D