Building Business Applications with Silverlight 4 & .Net RIA Services

Trusted By

Welcome Back! I hope you enjoy the content on this site. If you have not done so already, you may want to subscribe to my RSS feed or become a fan of this blog on Facebook. Thanks for visiting!

This is a good series of posts from Brad Abrams on building business applications with Silverlight 4 & .Net RIA Services

  1. Starting a New Project with the Business Application Template
  2. Exposing Data from Entity Framework
  3. Consuming Data in the Client
  4. Updating Data
  5. Validating Data
  6. Authentication and Personalization
  7. Silverlight and Search Engine Optimization (SEO)
  8. Exposing OData Services
  9. Exposing WCF (WSDL) Services
  10. Exposing JSON Endpoint - In Progress
  11. Working with Reference Data - In Progress
  12. Deploying to a 3rd Party Hoster (I could not do any better than Saurabh’s post!)
  13. Workflow Integration - In Progress
  14. Management with AppFabric - In Progress
  15. Debugging Tips and Tricks - In Progress
  16. Globalized and Localized 

 

This is great for getting started! My only beef with it is that unfortunately real life scenarios are not that simple.  I would love to see some more depth in these articles. Don’t mean to knock Brad’s work. It’s still better than nothing.

Hope that helps,

Hatim

Metro Application Style coming to Silverlight

The metro application style introduced in the Zune and windows mobile 7 is coming to Silverlight along with some other themes.

image

Isn’t it just gorgeous. Large fonts, simple forms and a simple layout

image

This more conservative look isn’t bad either.

Check out Tim Heuer’s post for the full info.

Sign up for a free trial at audible and get a free audio book from more than 50,000 books. And the best thing is you can keep it even if you decide to cancel after the 14 days trial

5 Tips on using Rapid Application Development (RAD)

As consultants which I believe most of the reader of this blog are, or even if you are a developer working for a software company, time is always of the essence. We are always trying to do more in less time either because we have a tight deadline or to free time to do other things we enjoy.

A concept that is not new is RAD or (Rapid Application Development) promises to let us do just that.

In fact so many software companies have tried many approaches to tackle this problem but unfortunately as it has been said before,  there is no Silver Bullet to beat the monster. There is no one size fits all methodology that can help all ISVs.

What I have seen over the years is that software vendors come up with tools that are either too hard to learn and thus us developers have to climb a pretty steep learning curve just to try them out and see if they are viable for our work environment. I am thinking here of the (Rational Rose Suite, The DSL tools by Microsoft) and so many others. Or on the other hand, they come up with too simple and weak solutions that are OK for small scale applications but that quickly bite the dust when facing large enterprise requirements. The slap on a dataset for each query comes to mind. You can try that with a multimillion records table and see how quickly it crashes!

When we started our company our first client was a large insurance company that needed a web application used by insurance brokers to sell their  products. We had a very tight deadline, and we needed a solid and scalable application that can handle multiple  transactions per second.

Today the system is not just a web application to sell insurance  products, but a full blown insurance system that handles claims, manages billing and also integrates with the company’s accounting system.

Last year we shipped version 3.0 of the online system and haven’t had a bug report since then. So how did we do it?

1. Write a framework

Even with the tight deadline we knew we had to write a solid code base that we can reuse for other projects and also to give us the flexibility to add new modules to the application without too much fuss.

The framework includes:

  • Logging interface
  • Data access helpers to handle transactions, factory to instantiate you DAL services,
  • Exception handling and logging
  • UI base objects and custom controls.

The framework should be optimized for performance and scalability. It has to be fully unit tested. You can think of it as the heart of your application, if it stops beating ..well  your application is dead.

2. Use Code Generation Tools

Back when I was in university I had written data access code generation templates for Code Smith. That’s years before LINQ or the Entity Framework. I just couldn’t bring myself to using DataSets and DataTables when I saw the performance hit when compared to DataReaders and Custom Objects.

Without code generation every time you make a change to your database you have to rewrite the Database access code, mapped objects, services, and UI. Retest everything and hope it works.

With the generated code we only need to change the services and the UI so that’s your work cut in half already.

3. Don’t reinvent the wheel for each project

Yeah I know that new tool or framework is so cool that you have to use it in  your next project. But your customer only sees 3 things in your software:

  • Does it work?
  • Does it address the business requirements?
  • Did you ship on time?

Which framework, or technology you used is the last thing he/she will care about. So stick to what you know. I am not saying you can’t learn new techniques or explore new frameworks, but do that on side projects and don’t use it in your projects until you can answer this questions with confidence: What are the chances I blow this project if I use (insert your new framework here). And your answer is none because I used it on X, Y and Z projects and I master it.

You should also have a viable business argument why you would want to switch to this new framework. Either because it’s going to cut our development time in half, or it offers a better user experience for the client etc…

4. Simple is Always Better

Remember your main goal is to ship a working version of your software while including the most feature you can on time. This doesn’t go along so well with trying to come up with the most clever solution. For example If your application needs to get a CSV file from a webservice and parse it to include those records in the database. You can write that in a few hours. You don’t have to put a BizTalk server to orchestrate all that for you.  you get my drift? Most of the time the simplest solution is the most elegant one and the safest.

5. Modularity

I try to always  break our applications in small modules. Why?

  • We can reuse those components in different project
  • As customer requirements change we have very loosely coupled modules that we can just replace without having to refactor all the code.
  • Give ownership of each module to a team member and thus speed development time.
  • It’s easier to unit test each module.

I am sure I left a few things out so do share your ideas in the comments please.

Looking for a great book on .Net? Pro C# 2010 and the .NET 4.0 Platform, Fifth Edition

Hope this helps,

Hatim

ASP.Net MVC 2 Released

ASP.NET MVC 2 is now available for Visual Studio 2008 and Visual Web Developer 2008 Express with ASP.NET 3.5. You can download and install it from the following locations:

The final release of Visual Studio 2010 and Visual Web Developer 2010 will have ASP.NET MVC 2 built-in – so you won’t need an additional install in order to use ASP.NET MVC 2 with them.

Some of the new features and capabilities include:

  • New Strongly Typed HTML Helpers
  • Enhanced Model Validation support across both server and client
  • Auto-Scaffold UI Helpers with Template Customization
  • Support for splitting up large applications into “Areas”
  • Asynchronous Controllers support that enables long running tasks in parallel
  • Support for rendering sub-sections of a page/site using Html.RenderAction
  • Lots of new helper functions, utilities, and API enhancements
  • Improved Visual Studio tooling support

For more information, see ASP.NET MVC 2 Released.

Smash Fear, Lean Anything – An inspirational video by Tim Ferris

This must have been one of the best motivating videos I have ever watched.

You can get his book “The 4 Hours Work Week” as an audio book if you sign up for a free trial at audible. And the best thing is you can keep it even if you decide to cancel after the 14 days trial. Or, if you prefer you can get the dead tree version.

5 Tips to get the most out of your coding time

I remember seeing an add from Microsoft I believe for hiring programmers and the jist of it was “We give you an office with a door”.

image

Why you might wonder?

Well, it might take up to 20 minutes to refocus on the task at hand after you get distracted either by a phone call, by a coworker barging in or by a video someone posted on Facebook.

I will give you an example of a spiral I used to find myself in. I will be happily hacking at this new feature that we need to ship soon and an email notification shows up for an email that I was cc’ed in so I open the email read it and can’t remember what it  was about so I end up reading the whole thread just to remember. Then I switch to my browser to see if there is anything new in my RSS reader, oh wonder if someone sent me something on Facebook. Off to Facebook I go.

An hour later I am back to visual studio and completely lost the thread to what I was doing. And that’s when bad stuff happens, bugs introduced and things get forgotten.

These are a few tips I use now to keep me focused and get the most out of my work hours.

1. Close your internet browser

As hard as it might seem, learn to open your browser only if you need it to research something related to the task you are doing.

What I like to do is to dedicate a couple hours before I start  coding to research the references I need. So that when I get started it’s only coding and nothing else.

Try it for a week and see how much stuff you get done.

2. Close your mail client / instant messenger

Don’t worry, if something really urgent happens you would know about it. You don’t need to keep your mail client open at all times, and read each email as it arrives.

Think of how many emails you are CC’ed in just for the sake of it and to which you have no say in. And think of how  many hours you waste opening those emails and getting distracted by them and having to refocus on what you were doing before.

Set specific times at which you read your emails. I find just before my lunch break and at the end of the day the best time. I find emails a good way to unwind :). I also end up writing better quality emails instead of the quickly I have to get back to what I was doing mess I used to send to clients.

If you don’t want to close just turn off the notification sounds and status bar alerts.

3. Unhook your phone  (or put it in silent mode)

This follows on the no email theory. I ask all our clients that if something is really urgent to send me an SMS. They almost never do so I let the calls go to voice mail  and I can check it later.

This tip is also good for keeping your clients  happy and show your professionalism,  you wonder how? Well when they leave a voice mail your already know what they want to talk about when you call them back. Say the leave the following message:

Hey Hatim, I wanted to know what’s the status of feature N° 156 and if we are still on for the system update schedule by the end of the week.

What you can do is go find out what the status of that feature, check with your team that everything is good and ready to go for the system update.

The phone conversation will take less time as you won’t have to stall them and scramble while you open your tracking application or IM the person responsible for the feature or your team to see what’s going on.

4. Buy good noise canceling headphones

image

I have a pair of Bose® QuietComfort® 3 Acoustic Noise Cancelling® Headphones. These are great for listening to music and also shields you from all the distractions. Coworkers talking in the hallway, the guy talking loud on his phone, … . They also work I just put them on without anything playing.

A nice plus is that they have great sound quality!

Of course you don’t have to use noise canceling heaphones they are just nice to have, regular headphones will do too, specially with some loud music!! :D

5. Make small and regular breaks

When I am coding I like to have a 5 to 10 minutes break each hour and a half to 2 hours. I either go get a coffee,  talk to a coworker, check voice mail, walk in the hallway. The idea is when I get away from my  screen I can have a better spatial thinking and find new ideas or solutions more easily.

It’s also revigorating and gives you a mental boost when you are working.

Oh I can finish this new screen and have my break.

A great book on how to manage time is Tim Ferris’s “The 4 Hour Work Week” you can get it for free as an audio book if you sign up for a free audible trial or if you prefer you can get the dead tree version.

I hope this was helpful and would to would love to hear if you have any tricks and stratagems to keep your self focused.

Hatim

Hitler Responds to The Apple iPad

Hitler has been dreaming about the day that Apple’s tablet will be announced. That day has come and he is not pleased.

 

What’s your take on the Apple iPad? I am truly not very impressed with all the hype that preceded it’s release I was waiting for something more impressive.

Good or Bad? Leave a comment!

Hatim

Facebook Fan Page

This blog is going 3.0 :) I have created a Facebook fan page for it and I would like to invite you to join. Also if you know friends that might be interested by the content of this blog be sure to invite them.

Facebook

Hatim

Unrealized Projects

We all have that idea (or ideas) that want to make happen, but don’t have the time or would get started on it as soon as we finish this current task, or that this time of the year is not the best time because all the stars are not aligned the way they should… If you have just the smallest bit of ambition you would probably know what I am talking about. (otherwise you suck!!)

image

Well I came upon this post by Seth Godin talking about how Tim Burton had a poster of all the failed projects that he was part of.

This is a guy that is behind some of the greatest movies of all time like Batman, Edward Scissorhands, you can check the whole list here http://us.imdb.com/name/nm0000318/ but just because he does fail sometimes he should stop. NO!!

The reasoning behind this is stop postponing whatever you wanna do and do it now and stop being afraid of failure. it’s inevitable you would fail most times than not but eventually the satisfaction and the rewards from that single win would out weight all those failures.

One key element of a successful artist: ship. Get it out the door. Make things happen.

The other: fail. Fail often. Dream big and don’t make it. Not every time, anyway.

Tim got his ideas out the door, to the people who decided what to do with them. And more often than not, they shot down his ideas. That’s okay. He shipped.

 

So do it and move on!

Hope this was helpful.

Hatim

Did you Know 4.0

This is a following to my previous post (thanks Khalil)

Recent Photos