Getting started with Oracle application development - java

I am not sure if I am getting in a little too deep but I have decided i'd like to learn how to develop applications built using the Oracle technology stack.
I don't come from a programming background (I have always been on the business side) but I love that no matter what problem you encounter, you can almost always solve it with a program of some description (i know 'program' is probably the wrong word there but hopefully you know what I mean).
So my questions:
Given I have no programming experience, should I be trying to start with something else?
If Oracle is an ok start, from what I can ascertain i'll need to get a fair grasp of Java as well. Where should I start?
Im not necessarily looking for the quickest way, but I do want to make sure that whatever I do gives me a good understanding of what is going on.

If you don't have any object-oriented programming background, I suggest you should start out by getting familiar with basic OO concept. I recommend reading this book "Head First Java" http://www.amazon.com/Head-First-Java-Kathy-Sierra/dp/0596009208 and the official java tutorial - http://java.sun.com/docs/books/tutorial/reallybigindex.html
After you get the idea and basic concept on object-oriented programming and java. You can move yourself to use any technology including Oracle technology stack and other OO language such as python and C#.

As natch3z has mentioned, if you don't have a programming background it might be worthwhile starting a little simpler than the oracle tech stack.
By Oracle tech stack, I am assuming using things like oc4j, ADF, oracle DB etc all within Oracle's JDeveloper IDE. Even though technologies like this can be powerful and achieve what you want, it might be a little overwhelming for a beginner.
It might be a little more advantageous to start off with something like the Eclipse IDE and work you way through some simple tutorials. There's nothing worse than starting with something difficult and getting discouraged due to being overwhelmed.

Why Java ? More specifically, what sort of stuff are you aiming to develop ?
For web applications, you could look at PHP. Oracle also has a web development/runtime environment in the database, called Application Express. That's a pretty simple way to get started in developing data oriented web applications. It is all part of a single install with their free XE edition.

For Oracle questions you could try posting on the new dedicated Oracle stack exchange site, http://www.oracleoverflow.com/, maintained by Simple Talk Publishing.

Related

Most effective server side programming language for web development?

This is more a question of pros/cons between PHP and JAVA.
Iv been doing research, and iv narrowed it down to those two.
And in consideration, id like to go into mobile app dev...So thats +1 for Java.
Time taken to learn the language is not an issue...Just would like to know which is the most effective between the two languages mentioned above.
And on a slight note. Can Javascript work with Java? And what is the real advantage of that?
All answers are appreciated, thanks in advance.
I'm sorry, but PHP and Java are not the only choices. Ruby on Rails and Python's Django framework are both excellent tools for web development. While I haven't used it, Groovy's Grails framework is also very highly reviewed (largely by ex Java programmers). In certain (admittedly obscure) circumstances it's even advisable to do something off the wall like write a CGI program in C. It all depends on what you're trying to do.
Mobile app dev shouldn't influence your choice here, because no matter what web framework you're working with a mobile app is a whole new ball of wax.
So, here's the deal: asking people to compare PHP and Java really won't get you any meaningful answers -- you don't have the background necessary to understand what we'll say. You really need to figure out what you're trying to do before you choose your tool. It's like saying "I'm thinking about building a house, should I use a screwdriver or a hammer?" Here is what I would advise:
Go learn to program. Pretty much any language will do, but I'd suggest something nice like Python or Ruby. Spend a few months getting comfortable with programming first.
Pick a project. Make it something simple. When you know what your project is, pick a tool to use to complete your project. This may involve asking another SO question.
Rinse and repeat. Complete many projects. Once you've finished 5 or 10 web projects you'll be in a position to compare different tools. The more tools you use, the better. I'd suggest you do one in Ruby on Rails, one in PHP, one in Django (a python framework), and maybe even one in Java with JSP.
Once you've got that base of experience come back and ask this question again. You'll actually be equipped to understand the answers. Of course, once you've got that experience you won't need to ask the question because you'll already know the answer.
The one you know.
Some feedback:
Mobile app dev is not necessarily just web development.
Javascript is the language of choice on the web browser and works with PHP, Java, etc. on the server.
In general, one language is not more effective than another.
Seriously, judging by your post, I would advise you to start learning PHP and Javascript.
You already have a web browser so you can start writing javascript now.
As for PHP just install XAMPP from http://www.apachefriends.org/en/xampp.html and after a double click you'll be ready for web development.
After learning what its all about you'll be able to then check out Java and see if it is more effective in what you are trying to do.
Your question really indicate you need to learn alot about web development and programming in general, so I could answer your question but.. I'd recomend you go read up a little.
And in consideration, id like to go
into mobile app dev...So thats +1 for
Java.
How is that +1 for Java? We're talking about server-side languages.. you're not running your server off a phone are you? Sure, you can use Java to build apps in addition to running your website, but that's a different story.
Time taken to learn the language is
not an issue...Just would like to know
which is the most profitable at the
end of all the training.
Neither language will make your site more profitable, but you may be in higher demand with different companies depending on what you know.
And on a slight note. Can Javascript
work with Java? And what is the real
advantage of that?
Well... yes, but that's almost a nonsensical question. You use Java or PHP to produce the HTML that gets sent to the client, and then your JavaScript manipulates that. It's completely unrelated to what language you use server-side.
#comment: I can't really say which is more worth learning. I suppose Java is more versatile in that it has more applications outside the web. PHP is supported by more web-servers though (AFAIK), so you won't have trouble if you need to work on a different server.
I can't fairly recommend one over the other though. I've only used PHP for web, and Java for non-web. I like PHP because it's easy to pickup, easy to use, and all sorts of stuff is built into the language without any includes or anything. Has a big community, so there's lots of scripts you can download. One might argue that it's also a mess of a language, but as long as you aren't all uppity about that sort of thing, it's not really a problem. Java OTH... I don't know. I'm not a Java keener, that's all I'll say :)
Most of the answers here should be able to direct you towards your answer though I would just like to say if you are going to learn a programming language to make Web Apps learn Java, not because this will be the best tool for the job, each job is different, but knowing a full fledged language you will be able to quickly adapt to other languages.
You don't learn a language, you learn the concepts behind programming, then apply them to different languages.
I think you need to outline the context of your question. For example, if you are looking to get a job in IT, then the language that is most asked for in job ads is the one you want. If on the other hand, you have an application in mind that you would like to write, then you need to tell people (without giving away the details) what type of application it is so that they can tell you the most suitable languages/APIs to for that area.
But remember this - there is no such thing as a super programming language that is the best for everything. Each language is suitable for a range of tasks in a range of contexts, and is usually awful for everything else. Without the context of where the language will be used, no-one can tell you which is better.
Stop trying to kill two birds with one stone. There are different tools for different tasks. You can write mobile apps with Java but you can't write web apps with it. You'll have to use a server-side programming language such as PHP, Ruby on Rails, Django (Python), etc.

Adobe Air vs Java for Internet Cafe Time Manager Application

I'm planning to do a little project to expand my knowledge in programming. The application I'm trying to build is an Internet Cafe Manager (I Know there are a lot software out there that is similar to what I'm building.). I had chosen this project since it involves connecting to a network, displaying data and time, and has a client and server version of the application.
Now I wan't to get your opinion on what language and approach do you prefer for me to use. I am thinking I will be using Air or Flex since I have a some experience with flash and I am also a fan of good interfaces of AIR/Flex. Also I am thinking that there maybe some read AIR application I can integrate to rapid my development. Java is also in my list, Two of my programmer friend suggest that I will go for Java, But I don't have any background on java.
What Do you think? Please let me know your opinion.
Thank You!
This is definitely a subjective question but it really depends on what you are most comfortable with. Personally, I feel that the tools for Flex/AIR development are much easier to get started with the those of Java. This is especially true if you are taking about using an IDE for Flex development. Using the Flex framework could definitely allow you to get more done quickly.
Just my opinion.
Java is definitely a useful language but can be a big pill to swallow if you are just starting out.
Hope this helps!

Delphi to PHP, Java or Ruby? [closed]

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.

How much of a transition is programming Java to iPhone apps?

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.

Is Java too complex a programming language for a beginner one man programming team?

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

Categories

Resources