Skip to main content

Learning new web frameworks

So in case you didn't already know, I'm a web developer and have been doing it for over 10 years now and still really love it.  It's always changing and there's always new things to learn and new challenges and the web is relevant to me and almost everybody else.

The majority of my career has been around Microsoft based technologies such as ASP and ASP.net. Currently, I've adopted Microsoft's ASP.net MVC framework and really love it.  It makes sense and is easy to use.  The razor template engine is really great too.

However, I wanted to step out of my comfort zone and learn some new frameworks, see what they do differently or better, and allow me to experience new languages.

I first started off dabbling in Python and using the Django framework.  The language is nice and I was pleased with the framework, but wasn't really impressed with the performance. Also, not a lot of major sites have adopted it so it doesn't seem to be gaining a lot of popularity.

Then I tried out Spring MVC which uses Java.  From what I read, I thought I was going to like it, especially with Spring's built in DI framework and various other components, but it took too long just to configure a project and get it going.  There was way too much configuration, and I prefer convention over configuration. Also, the template engine I didn't care for much and would have had to rely on a third party template engine like Apache Tiles to effectively create templates. Importing tags and the tag styles remind me of ASP.net web forms, which I liked initially due to the ease of use and reduced coding, but then you lose flexibility and control of the rendering.

Then I looked into the Scala language which is a nice blend of OOP and functional programming.  It can be compiled against the JVM or .NET CLR, which is nice since you can still use all the Java libraries out there.  C# has some functional paradigms such as lambda expressions and the ability to treat functions as variables using the Action and Func types.

Two frameworks that I've looked into for Scala are the Lift and Play frameworks. Play also supports Java, but for the Scala version, uses a Scala based template engine that out performs the Groovy template engine that Play uses by default for the Java version.  Lift looks promising and is currently used by FourSquare, however, the documentation is lacking and incomplete, with many pages still saying "TODO".  Both frameworks also allow you to save changes and go without having to recompile and re-deploye/restart your app.

I decided to invest my time learning Play since it has a style that I'm familiar with and has better documentation at the moment.

What is your favorite framework and language to use for web development?

Comments

Popular posts from this blog

Using the BIQU Hermit Crab CAN

I was recently offered to try out the BIQU Hermit Crab CAN.  This was great timing as one of my printers was down due to a bad thermistor cable in the cable drag chain.  I was in the process of removing the wiring and also replacing the drag chain to an open style which allows me to open up each segment and easily add or remove wires.   What is the Hermit Crab? The Hermit Crab is a quick change tool, which allows you to easily and quickly change out your tool. For example, you can change to a FDM extruder, or a laser engraver, or a cutting tool, or whatever you want. The CAN version uses just one USB-C cable (doesn't use USB protocol, just uses that style cable for convenience). The USB-C cable carries the data and power to the hotend. The CAN version has a bunch of nice features such as accelerometer, Neopixel RGB LEDs, and TMC2209 stepper driver. Current setup In this photo, you can see my current setup as I'm in the process of rewiring.  I've got an Orbiter extruder with

Add business days with moment.js

Date . prototype . addBusinessDays = function ( businessDays : number ) { // 5 business days in a week const weeks = Math . floor ( businessDays / 5) ; // Convert business days (5 days in a week) to regular days (7 days in a week) const days = weeks * 7 ; const date = moment ( this ) ; // Convert the incoming date value to a moment value. const newDate = moment ( this ) . add ( days + ( businessDays % 5) , 'days' ) ; if ( newDate . day () < date . day () || newDate . day () % 6 === 0) { // Add 2 more days if we land on a weekend, or we went through a weekend. newDate . add (2 , 'days' ) ; // .add is not pure and will change the underlying value } return newDate . toDate () ; } ;

Leading zeros in SQL

So at work today, I ran across a SQL stored procedure called 'fixLeadingZeros' that has the below implementation. It's actually much longer than this since it does it for several columns.... and some columns have longer values. In other words, if the field is supposed to have 8 digits, it has 8 statements.  I couldn't help but to feel a bit disgusted from it and had to share it. UPDATE [SomeTable] SET SomeColumn = '0' + [SomeColumn] WHERE len (SomeColumn) =4 UPDATE [SomeTable] SET SomeColumn = '00' + SomeColumn WHERE len (SomeColumn) =3 UPDATE [SomeTable] SET SomeColumn = '000' + SomeColumn WHERE len (SomeColumn) = 2 UPDATE [SomeTable] SET SomeColumn = '0000' + SomeColumn WHERE len (SomeColumn) =1 UPDATE [Some] SET SomeColumn = '00000' WHERE SomeColumn ='' OR SomeColumn is null This could have been done a LOT easier.  If your goal is to update existing columns so that t