About the author

Miron Abramson
Me
Software Engineer,
CTO at PixeliT
and .NET addicted for long time.
Open source projects:
MbCompression - Compression library

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2014

Creative Commons License

Blog Flux Directory
Technology Blogs - Blog Top Sites

Why I think I will stick with WebForms

The MVC concept is clear and logic and the guys at Microsoft did a very good job with the new MVC Framework , But I think I will stick with the 'old fashioned' WebForms and this is why:

1. I don't need anybody to 'force' me to seperate my code into layers. I do it any way in every site I build. I have a DataAccess layer, a Business logic layer and a 'View' layer, and I know exactly when and where to use each layer.

2. I build web sites. I don't need my code to work with any other 'View' other than HTML, and if I do, as I mentioned before, my Business logic layer is in a seperate dll so I can reuse it.

3. One of the first things I do when I start a new project is to disable the ViewState in the web.config, which leaves me with a hidden field with about 50 chars length (aroung 50bytes) - I can live with that. That will not slow down my site. If the page is not doing any POST, I can remove the <form runat="serve"> from it, and then there will be no ViewState at all.

4. I heavily use JavaScript and Ajax (usually with jQuery & my own js 'framework') to give better user experiance.

5. The only 'Databinding controls' I use are Repeater and ListView (and DropDownList) that are rendering exactly the HTML I want.

6. The only server control (other than  'Databinding controls') I use are HyperLink,Literal and PlaceHolder that not render any extra HTML other then what I want.

7. I heavily use inline expression

8. I use short 2-3 chars names for my controls.

9. I do use NUint (truly, only when I must)

10. I use httpcompression to improve performance.

11. I use Url rewriting if needed.

12. My code is well organized and very easy to maintain.

13. I know all the little secrets of the ASP.NET framework and know how to take it to it's limits

 

I bet my sites have no worse performance than MVC sites or any other technology  and I'm sure it will take me less time to build a well organized site with all the points above.

I built and designed tens of sites. From small, medium to very large, and never had a performance problem that couldn't be solved by using the above points.

Use MVC if you want to be cool. I will stay with my oldy friend - WebForm

Why should I replace a winning horse ?

Currently rated 3.5 by 21 people

  • Currently 3.523809/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:
Categories: ASP.NET | C# | Performance
Posted by Miron on Friday, February 13, 2009 6:26 AM
Permalink | Comments (21) | Post RSSRSS comment feed

Generate thumbnails on the fly - Yet another version

There are many posts how to generate thumbnails using ASP.NET. Some good some less. Be sure to get distance from the versions that use Image.GetThumbnailImage method.

I'm using my own version that going with me from project to project and it is an HttpHandler that registered in the web.config. You can specified maximum height, maximum width, both, specified quality (1-100) and if the image will be cached or not. It is working well with .jpg, .bmp, .png and .gif. The code is too long to write it here, but it is really easy to undestand and really easy to implement and use it.

To use it, add the class to your dll or just drop it in the App_Code folder,register the handler in the web.config as the following:

<add verb="*" path="image.axd" type="Miron.Web.ImageHandler" validate="false"/>

In your site, to generate a thumbnail with size 150X150 in 90% quality (The image will be cached automatically):

<img src="image.axd?src=~/images/photo.jpg&amp;w=150&amp;h=150&amp;q=90">

If you want the image to not be stored in the cache:

<img src="image.axd?src=~/images/photo.jpg&amp;w=150&amp;h=150&amp;q=90&amp;nocache">

 

You can see it in action in the gallery I did to my new nephew Noam: http://mironabramson.com/noam

Hope it will be useful.

ImageHandler.zip (2.85 kb)

Currently rated 4.2 by 6 people

  • Currently 4.166667/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: ASP.NET | C#
Posted by Miron on Sunday, February 08, 2009 7:51 AM
Permalink | Comments (6) | Post RSSRSS comment feed