Questions from a Power User on the Road to Programmer

I have spent the last few weeks working with a power user in our investment services division. This guy has moved beyond Excel Macros and Access databases to ASP.NET WebForms and SQL Server. From what I can tell, he is completely self taught which is something I can respect. We have been working together building prototype tools that are useful to the investment division in the short term to flesh out ideas for larger scale projects.

It has been interesting trying to balance my strong opinions with his GDS enthusiasm, certainly a reality check in the architecture astronaut in me. It has also been really fun to figure out how to introduce new tools into his toolbox with out throwing everything and the kitchen sink at him. He took to source control with Subversion like a fat kid on cake and was a bit skeptical about continuous integration with TeamCity but I think I am winning him over there.

I have suggested some training resources and it looks like he has been digging in. This morning I got an email from him with a list of questions, that I wanted to share. It is an interesting insight into what it must look like today to get started as a programmer.

Below are the questions he asked me and my responses. How do you think I did? Would you have responded differently?

Hope you don’t mind me pestering you with basic questions… Feel free to ignore me if it’s annoying.  And don’t feel the need to type out full answers if you don’t want to – we can discuss next week if you prefer…

Do I need to know JavaScript in order to use jQuery?

jQuery is a framework built in JavaScript that makes differences in browsers easier to work with and ajax a snap. Some basic understanding of JavaScript is required yes.

Does it make sense to use jQuery with WebForms, or only with MVC?

jQuery can be used in webforms yes. But this is the wrong question. jQuery and JavaScript are platform agnostic meaning you can use them in any web site regardless of the platform the site was built with. There doesn’t even need to be a application platform, it works with static HTML files.

Doesn’t ORM encourage poor database design?

Yes. But lazy developers will build bad systems regardless. Understand what your tools are doing for you.

Does a calculator make you bad at math? ORM is a tool that makes certain things easier and makes other things awkward. Like any tool it is not appropriate for all jobs. And the use of an ORM does not excuse you from needing to know good database design and make good choices within the context of the application you are building.

How do you get data from POCO objects into a jQuery control (i.e. Do you have to write a web service, or somehow serialize it to JSON, or is there an easier way?

There are many ways of accomplishing this, the one I prefer is serialization to JSON which is ridiculously easy in MVC but not so much in WebForms. DataTables can consume JSON or simply apply itself to an existing HTML table in the page markup. The level of interactivity you want in the table really dictates which route you want to take.

Do you have to actively interact with JSON in order to use jQuery/MVC, or is it one of those things that you know is there but never see…

You have to actively interact with it just like you would a POCO object in C#. The neat thing about JSON is you don’t have to define the structure of an object before you use it.. {Id: 1, Name: ‘Dirk Diggler’} there I just created a JSON object.

If you’re not exposing data to third-party clients, are web services relevant/necessary anymore, or is there always an easier way?

Web services can still be useful but are increasingly becoming less relevant as lightweight RESTful services become popular. The shear overhead associated with SOAP based messaging is ridiculous when trying to publish something like a twitter stream. JSON is far simpler and easier to work with.

Does anybody use the built in Forms authentication provider in ASP.NET, or is there a better solution available for non-windows authentication?

Forms based auth is a decent start but you can quickly outgrow it. We mostly use windows based authentication internally. I am unaware of what the current practice is in the .NET community for authentication on public sites, it’s been a really long time since I have worked on a public site that required auth in .NET. The only advice I have is NEVER under any circumstances should you EVER store a password in clear text in a database. 8) See the recent Sony debacle for reference.

Follow me on Mastodon!