The Education of a Programmer (Me)

Just another site

Month: October, 2012

Review–Learning JavaScript Design Patterns Addy Osmani O’Reilly Press

I’m back with my book reviews and in this case, it’s Addy Osmani’s newest book from O’Reilly Press: Learning JavaScript Design Patterns. Being honest, I read Addy’s blog pretty regularly, so I knew what to expect from this book before I got started reading it.

However, having said that, I was surprised myself about the amount of detail in the book. The first thing I have to say is if you want to read this, you had better be very comfortable with your JavaScript skills. Mr. Osmani is a master of JavaScript and this is not a book for learning JavaScript from scratch. Do not misunderstand me please, it is excellently written and highly technical, it’s just not for a beginner.

He takes apart most of the “Gang of Four” design patterns which have been used successfully for years and shows each of them in a JavaScript light which, for me, was incredible for ideas on things for which I either am working on or will be working on soon. Each code example is well commented (reminding me of my own shortcomings in that area at times.) and after two or three of them, I was following the code structures quickly enough to be able to anticipate why the code was so structured and where I could make use of similar patterns in my own projects.

What I appreciated the most was the second half of the book where he examines JQuery design patterns and how they can be applied in plug-ins and in production code. Again, with excellent comments all over the board, I could see the structures unfold in front of me and the book is excellently referenced so you can follow up with tons of content to support his work and to extend your own ideas.

If you are a serious developer, or if you are a dedicated hobbyist who wants to really grok code better, make this a staple on your ebook shelf. (I’m certain the print version is just as good, but with all the hyperlinks within the book, I love the ebook version myself!) Then again, I would also suggest subscribing to Addy’s blog too. It is filled with fantastic information and he has a few other gems there for everyone at various skill levels.


Write the Evaluator or How I Learned to Stop Worrying and Love the Micro-ORM

If you’ve been reading so far, you know that I am working on a multi-tiered app in C# and it’s very database heavy. I had tried to configure NHibernate to take care of the heavy lifting for me, but configuring it to Oracle hasn’t been a simple task. Honestly, I’ve read some of the driest instructions on the planet and found them easier to understand. I don’t doubt that FluentNHibernate is a viable solution, it just has not been as easy to throw together. Most of the documentation is written for 2.X implementations of NHiberate and really since 3.2.X has been out for a while, the documentation should be updated. I know that Oracle is making great strides on ODP.NET working well with EF, but it just doesn’t feel well put together for non-trivial applications.

My biggest issue with NHibernate and Fluent (for that matter) is that with the nature of some of my tables, I don’t really have a true PK for them, so the whole thing will fail for the UD portion of CRUD. I know that the queries can be useful, which really is the most important part, but I do have to do updates in places to ensure that I don’t resend data.

I’ve been looking at some of the micro-orms in hopes they could prove to be interesting and give me some of the edge I need somewhere. Since I have to use an Oracle database, it seems I’m limited to 3 of them: Dapper, PetaPoco, and Simple.Data .

Now the trick is to look at these as well as the 800lb gorilla that is FluentNHibernate and see what is going to work best for my needs. As I keep writing, I will talk about what I find and where it is going.