Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 16, 2012 11:51 AM by wajdhaikal
Jun 28, 2012 07:40 AM|LINK
I heard alot about MEL but when i explored it I just saw wrapper classes , know my question is that , there are already thousands of classess of .net , developer already using and practcing them , why microsoft put them into furhter wrapper classes i dont
found it any much useful ?
Can any one tell me the benefit for its usage ?
Jun 28, 2012 08:11 AM|LINK
Code written by Micrsoft is always better and optimized because Framework belongs to them.here is the from stackoverflow
For the database application block, the main advantage is that it makes it easier to produce database-agnostic code. The developer interacts mainly with generic Database and DbCommand objects, rather than eg SqlConnection, SqlCommand, etc. Thus, switching
to a different database (ie Oracle) becomes more feasible. Depending on your business needs, this could be a definite advantage. EntLib also gently prods the developer in the direction of using DbParameter for query parameters, which reduces the risk of SQL
As another poster mentionned, the data app block is somewhat higher-level than the straight ADO.NET classes, so it tends to require fewer lines of code to do the same thing.
From my point of view, the data, exception and logging blocks are the most useful. Exception and Logging together make it very easy to log exceptions (duh) to a number of places and in a number of formats. For example, they can put the entire exception log
entry, including the stack trace, in the Windows event log making it relatively easy to diagnose a problem.
One disadvantage of EntLib is that some app blocks place quite a bit of logic into configuration files. So your logic is more spread out; some of it is in code, some in config files. The upside is that the configuration can be modified post-build and even
Aug 16, 2012 11:51 AM|LINK
Yes this is right. In addition to this.. we still can only install and configure what our application needs. Here I'm using the data application block, ASP membership and logging and really EL minimized the lines of code I used to write specially in data