tmikew
I like Java script but I think making it go server side is backwards. Why not make Python or Perl or Ruby go client side instead? (I am sure plenty of folks smarter than me have already thought about and probably worked on it.) Those languages already have all the parts they need except a connection to the browser dom. Java script has a connection to the dom and practically nothing else. These other languages have been getting tweaked for years on the server side. It just seems like such a big byte to get Java script to work as a regular language like the others. It also ignores some of the things that are lurking like Erlang and Clojure. It sounds correct that there are lots of Java script programmers. However are there lots of Java script only programmers? I doubt it. While it is compelling to write one language every where, I dream about it sometimes, we aren't close yet.
So embedding the Perl, or whatever, interpreter into the browser is probably a chore, but it is also probably doable, the browser should be able to deal with multiple languages. I think it is just that the people that are capable of doing that job looked at it and said. "Crap! I will just learn Java script." So the reality in my mind is that programming in two or three or four languages is just easier than doing all that other work. Everybody does it. In fact we say I know Java, or Python, or Java script, but that is just a word to give us a frame of reference when we communicate with each other. In fact what we really know is how to program computers and Python is a subset of the total global programming skill that I have. It is a like speaking English in some specific domain. There is jargon everywhere, one can speak English but one tends to get easily lost if one listens to lawyers speak to each other or doctors, and one is also not a doctor or a lawyer. Does that mean we should create a generalized English that both doctors and lawyers can use in each of their specific domains? Seems a little silly when one thinks about it. Is making Java script work everywhere is really buying all that much?
6 weeks ago I walked into the bosses office and resigned. He tried all manner of stuff to get me to stay. I wouldn't do it. Previous to me walking in there I had been thinking about in my own head. "If they would pay me BIG $$ would I stay on for this latest disaster project, and get my bonus for this year?" The answer was NOPE. So by the time I walked in there the ship was already sunk and my boss couldn't save it. I had no job to go to. Interestingly my boss gave up after a few minutes and told me good luck, and he felt his job sucked to and shook my hand. My co workers also congratulated me and I left on good terms.
6 weeks later. I have some savings, my house is nearly paid for and my payment is small anyway. I can make it for a while without doing anything different to our monthly budget. I will need to figure out health insurance soon. That is the biggest thing on my plate. Something else happened. I slowly realized that the pain at work had crept up on me a little at time for about 2 or 3 years. I was like the frog in the slowly heated pot, I was dying there. I feel 100% better now. I can't even tell you how much. I have all sorts of ideas that I might try and do. In the spring I will find some sort of job just to buy the groceries. You couldn't drag me back to where I was with a team of horses and I was making north of 100k base, plus bonuses, and nobody was really telling me what to do. Yet still it was not worth it.
The time with ones kids and family are worth way more than the money. Being able to sit and decide what I might do is exciting. I mean I feel the best I have felt in some years, and I am unemployed with no prospects. I am a happy man.
Don't do anything crazy just because of me, but I am you 6 weeks later...
I have personally thrown out entire chunks of code except the unit tests and started from scratch to get things working again. I don't think the value of this can be understated.
Today I have learned to think in work flows and the visualizations of the UI. This is how the users of the program view it. To users the UI is the program. Now the users accept my work 90% of the time. I seldom think about the methods or data structures anymore until I am actually sitting there typing it in.
I much prefer the distributed stuff. Just make a repository anywhere now it is an awesome concept. Soooo much easier than fiddling with an svn server for example. (I am talking about the set up of the server.)
I personally think it is completely worth it to get your head wrapped around the idea of distributed revision control. Aka mercurial or git.
Rolling eyes and shaking head at all of the other folks on this post who recommended avoiding learning revision control as soon as possible. That would be a mistake.
You will not likely have a better opportunity than now to do this. It sounds fun to me and I am an old guy. I keep wondering. Why would you not also earn a little money along the way as needed? Doing whatever.
I am 44 I have house, wife, 3 kids. When I was 23 I was freaking clueless, though I didn't think so at the time. (There is a good chance I still am clueless) School was easy, Navy was easy, studying and taking tests and getting good scores was easy. I was bored and figured there wasn't much else to be done. I was completely wrong about that.
So coming from an old guy. I would suggest dumping your easy job and finding one that is challenging for you. There are plenty of hard problems to solve. All of the sharpest people I know never let go of a hard problem until they figure it out, and they refuse to slog through the easy stuff like some kind of drone. There are surprisingly few people in this category. All of the sharpest people I know read continuously about a wide variety of things, and they build or write about things based on their reading. All of the sharpest people I know put down the keyboard and have some other really interesting thing they do.
The Humble Dialog Box
It is possible to use ajax and Javascript without getting things to mixed up, but again the discipline by the developers I am involved with is sadly lacking. There is another article I will try and find to post. Humble Dialog that fits with this paradigm.
Enforcing Strict ModelView Separation in Template Engines
Then we built a whole enterprise web application using just a stock J2ee container and RESTful style thinking. How much simpler! No extra frameworks to learn. The UI became completely decoupled from the services. The services are completely decoupled from the J2ee container, naturally. All the container does is resolve the nouns to a service name and give a call back to the appropriate verb method, doGet, doPut, doDelete.
In fairness we are not 100% RESTful there is some legacy stuff that relies on the session. However having done a few SOAP/WSDL services and tons of Struts actions or Spring "injections" I must say that REST is in my opinion a much cleaner way to code for web apps. Whenever I hear about some implementation needing a SOAP/WSDL service I run the other way as fast as possible. I won't even debate folks about it anymore, I just refuse to work on all that complexity.
As an aside I have seen here and there some frameworks the purport to use REST. I don't really get this. Why would somebody need and additional framework to make something RESTful? I have done it with J2ee and just plain Apache. I believe the web itself to be the framework, I could be way off in my thinking though, it wouldn't be the first time. Anybody have any clues about what a RESTful framework is for?
Programming in my opinion is a reading comprehension skill, solving cute little technical problems won't build large scale maintainable solutions. Even though they are fun to throw around at interviews they don't prove much. :)
In practice I have noticed that where I work we tend to have complex data structures but not very deeply nested ones. We wrote a simple find function that recursively traverses the JSON structure looking for keys. Not anything nearly as powerful as XPath but sufficient.
It tends to be highly useful in my experience to create a list of objects. For example instead of a list of phone numbers a list of phone number objects. One may then easily add attributes to the phone number. Primary, cell phone, home phone etc. This tends to be highly flexible in that attributes may be later added that were not at all considered up front.
Of course all of this can be done with xml as well. JSON just seems more convenient. If I add an attribute in Javascript or Python I can just use it and get on with it. No messing with my SaxParser or building up some new XPath. Again I am not bashing xml at all, this is just my take.
In practice we use JSON exclusively in the core services for input and output. When we need to use xml we convert it to JSON and then back to XML as a filtering process rather than fool around with our core services. This adds overhead but keeps us flexible and loosely coupled.