Information Technology Reference
In-Depth Information
However, because Microsoft provides powerful data access in architecture, in data
processing, efficiency has decreased, for example, when we connect to the database,
we should write a class alone, it will be connected data available statements written
in, and then, every time you have access to database, it generates this object, and it do
the database connections, then make database operation. Due to the existence of
inquires that it might appear in different platforms simultaneously data manipulation
phenomenon, also add transaction, that is to say, when we do a data access, we will
write about 20 lines of code, which not only makes code amount increases, but also
increases the rate that the data in the process may go wrong. Make the programmers
to put most energy in technology, in the object-oriented, customer-oriented era, if we
want to try to meet customer demand, it demands that energy is put in business, and
non-technical issues. Therefore, we design simple database access mechanism
framework.
3 Design Thought
3.1 Inversion of Control
Inversion of Control is one of the important of object-oriented programming
methodologies for cutting of the computer program coupling problem. IoC is also
called Dependency Injection.
IoC could be seen as the distillation of the factory model , and it also could be seen
as a big factory, which is just to create objects that are defined is in XML documents.
And then useing Java "reflection" programming, corresponding objects are created
according to the class name which is given in XML . Judging from the realization,
IoC changes the code which is fixed written in the factory method object to be defined
in XML file. That is to say, the factory is separated from object generated, so as to
improve flexibility and maintainability.
3.2 Design Patterns
Design patterns are composed of a group of particular relationship class or object. The
special relationship between class and object refers to the calls, communication
(events), collaboration and dependencies. It also determines the classes and examples
it contained, their roles, collaborative approach and responsibilities distribution. Its
naming and abstraction determines the major aspects in the structure, and formed
reusable object design. Design patterns focuses on specific object design problems or
points, describes its environment, constraint condition, effect, and processes itself
according to the specific problem.
3.3 Design and Implementation
The file app.Config is the core configuration file in the entire database access
framework , which can be embed the boot file app. config.
Main structure is as follows
Search WWH ::




Custom Search