Posted by Mohamed Abdeen | Posted in Uncategorized | Posted on 20-08-2010
0
Delete & Truncate have identical tasks (Delete data from table) but with the following differences: (Note that you may have this question @interview
:))
- Truncate:
- DDL command
- can’t be rolled back, all of the memory space is released back to the server.
- much faster
- don’t check constraints
- Delete:
- DML command
- can rollback
- slower than Truncate command
- check constraints, if exists then show errors
Posted by Mohamed Abdeen | Posted in Uncategorized | Posted on 19-08-2010
0
Since most object-oriented languages and runtimes provide object instantiation (e.g. new, newobj, etc.) and initialization (e.g. constructors) mechanisms, there may be a tendency to simply use these facilities directly without forethought to future consequences. The overuse of this functionality often introduces a great deal of the inflexibility in the system, as the direct use of a language/run-time object instantiation function creates an explicit association between the creator and created classes. While associations are a necessary type of relationship in an object-oriented system, the coupling introduced between classes is extremely difficult to overcome should requirements change (as they always do). [MSDN Microsoft]
One of the most widely used creational patterns is the Factory. This pattern is aptly named, as it calls for the use of a specialized object solely to create other objects, much like a real-world factory [MSDN Microsoft]
As with other design patterns, there are countless variations of the Factory pattern, although most variants typically used the same set of primary actors, a client, a factory, and a product. The client is an object that requires an instance of another object (the product) for some purpose. Rather than creating the product instance directly, the client delegates this responsibility to the factory. Once invoked, the factory creates a new instance of the product, passing it back to the client. Put simply, the client uses the factory to create an instance of the product [MSDN Microsoft]
The factory completely abstracts the creation and initialization of the product from the client. This indirection enables the client to focus on its discrete role in the application without concerning itself with the details of how the product is created. Thus, as the product implementation changes over time, the client remains unchanged
http://gsraj.tripod.com/design/creational/factory/factory.html | http://msdn.microsoft.com/en-us/library/ee817667.aspx | http://www.dofactory.com/Patterns/PatternFactory.aspx
Posted by Mohamed Abdeen | Posted in Uncategorized | Posted on 19-08-2010
0
This is a temporary post that was not deleted. Please delete this manually. (66596951-64c2-40f8-b2e1-d5e9dc00c9dd – 3bfe001a-32de-4114-a6b4-4005b770f6d7)
Posted by Mohamed Abdeen | Posted in Uncategorized | Posted on 11-08-2010
0
Dynamic data enables you to create a data-driven web site with little or no coding
An important feature of Dynamic data is the scaffolding framework. when scaffolding is enabled in a dynamic data web site, ASP.Net analyzes the application’s data model and generate web pages dynamically based on the data in the data model. these auto generated web pages provide the capability to display, insert, delete and edit data for each table.
we have two options of this project template:
- ASP.Net Dynamic Data Entities web application
- ASP.Net Dynamic Data LINQ to SQL
in our example, let’s try Dynamic Data LINQ to SQL
the next step, is creating data model using LINQ To SQL (by adding new item –> LINQ To SQL Classes) to your solution and change connection string in the web.config
then, you need to register data @Global file
if you view the default page, you will see list of all tables in your data model, if you press on one table