Solvegen articles

Archives by date

Search in Blog

Contact information

Solvegen, Inc
Phone: +1 310 929 5205
E-mail: info@solvegen.com
Web: www.solvegen.com
Skype: solvegen
MSN: solvegen@hotmail.com

Data access patterns: Active Record & Unit of Work

June 18th, 2009

Active Record

Active Record Pattern gained in their time of great popularity on the wave of fashion for Ruby on Rails. In a nutshell, the essence of the pattern is as follows:

  • Record: each object is, in fact, write a wrapper in the database.
  • Active: this object has methods to work with: he could save himself and update. To extract used static methods of the same class.

From the perspective of the school about the PLO, all right - let the object itself serves, because it shows how thrust themselves into the database!

Active Record Pattern extremely easy to use, and he earned the love nationwide. To start with, the old-fashioned, with the creation of a database, and then prescribes the connection string, press the button, and we have finished the classes, which we can now object-oriented twist tricks.

It is clear that, in terms of “advanced” design, there are at least three deadly sins. First, the class-essence can too. This, in part, is not so urgent in view of the fact that the entire history of communications with the base sits in a base class or generate partial. But the purity of design still spoils. The second sin - the fact that the structure is forced to repeat the grade structure of the base. As a result, in the domain layer vytvoryat different countries have to focus. And the third - a consequence of the first two - Persistence Awareness (contrast Persistence Ignorance). In addition, the static type FindByXxx methods do not allow the use of mock testing facility.

Because merits can be described as simple: we do not need any ISession or DataContext, there are only objects of-fact, with whom we work, let them understand how they work with the database.

As a result, this pattern is ideal for those who are going to stop writing SQL code mixed with code, and wants to quickly and without extra effort zamutit PLO. It also works well for applications in the style of CRUD, when we want to make just some interesting interface for reading or modification of our beloved base. In general, for camp “base on top.”

The most famous analogue to. Net - framework Castle ActiveRecord, which is simply a wrapper over NHibernate. Another worth mentioning previous incarnation SubSonic, which was designed from the outset with a view to the Web, and was dotnetovskim similar to RoR-a. However, users of these frameworks over time began to strain at the deficiencies described above, and frameworks have to meet them. For example, in Castle ActiveRecord classes appeared ActiveRecordMediator, which assume the job with the base, and generally similar to the Repository.

Unit Of Work

Rather than entrust the objects themselves flounder in contact with the base, we can arrange for this special class. For example, in this NHibernate ISession, but DLinq - DataContext. Objects-fact in one way or another “is recorded in this object, and then we velim him to retain all accrued to the date of the change (usually in a single transaction).

If we use the UoW, it does not mean that we have Persistence Ignorance. For example, there are certain requirements to object-entities: for example, they must be Redefine the (virtual) properties, or they shall be heirs of a certain base class. But the fact that all communication with the base trusted professional, and the objects do not breathe on their base, clean the handle, it’s definitely a step forward.

How can I make insert a space character ( ) into my html output from the xsl?

June 16th, 2009

I tried so:

<xsl:text> <xsl:text> — have no space character in html code;
<xsl:text>&nbsp;<xsl:text> — don’t work, XSLT processor error “Entity ‘nbsp’ not defined.”;
<xsl:text>&amp;nbsp;<xsl:text> — obtained &amp;nbsp; in html code, but no space character;
<xsl:text><![CDATA[ ]]> <xsl:text> — have no space character in html code;
<xsl:text><![CDATA[&]]>nbsp; <xsl:text> — &amp;nbsp; in html code, but no space character;
<xsl:text><![CDATA[&nbsp;]]> <xsl:text> — &amp;nbsp; in html code, but no space character;

Finaly, I decided this by inserting <![CDATA[&nbsp;]]> into XSLT, and then seting attribute “disable-output-escaping” in XSLT to “yes”. But I suppose this solution is not the best one.

Сorrect code: <xsl:text disable-output-escaping=”yes”><![CDATA[&nbsp;]]></xsl:text>

Why Solvegen?

May 6th, 2009

Flexibility

There’s more than one way to solve a problem. We will provide you with the information you need to choose the best solution for your problem, taking into account your budget, timeframe and current technology.

The fast-changing pace of the business environment demands a flexible approach from companies if they are to remain competitive and take advantage of new opportunities. We are taking measures to increase our flexibility.

Integrity

Your Integrity is Our Integrity In the early days searches would sometimes bring up sites that were unrelated to your keywords. These pages didn’t connect with what you needed, yet something was causing search engines to rank them highly. Programmers soon realized that people were cheating to unfairly boost their site’s ranking. These sites took advantage of search engine algorithms which sometimes caused search engines to penalize or ban them.

At Solvegen, you will never have to worry about that problem. We recognize that your website represents both your integrity and ours - and we strive to give you the best results while maintaining the highest of industry principles. We use industry best practices and ethical standards to ensure that your search engine optimization and marketing processes are achieved through honest means.

Advantages

We take pride in the efficiency of our operations and our ability to be innovative. Solvegen, Inc has gained rich experience in the development of custom business applications. We have successfully completed a wide range of projects on time and within budget. We know how to organize our efforts to complete projects of different complexity and scope.

Communication

Solvegen, Inc understands that successful technology projects depend on clear communication between the client and the technology outsourcer. Communication is essential for businesses wishing to harvest the many benefits of offshore software technology outsourcing. A strong, face-to-face client relationship helps both the client and Solvegen, Inc create exactly the right solution.

Project Management

A project begins by shaping the project ideology to ensure a common vision on the project between the customer and our company. Every Solvegen, Inc project is staffed with two professional project managers - one offshore and one onshore. Project managers and software engineers understand the relationships between systems, people and business processes. With our rich experience in various industry domains, we are able to optimize product architecture in regards to cost, scheduling, and quality.

Risk Management

Solvegen, Inc pays special attention to risk management during the project implementation. Project management team thoroughly investigates possible bottlenecks that may have a negative effect upon a project. Our risk management methodology ensures system functionality redundancy in respect to usage and control, along with easy scalability.

Reduced Costs

Our overseas programmers allow us to deliver great value to our clients in both price and speed of getting the job done. Everyone is looking for ways to get more for each dollar invested. You need to stretch your budget and one of the ways is to use offshore programming as a part of the development cycle. You can expect to reduce your project budget 2-5 times by eliminating expenses on social insurance, taxes, and IT infrastructure and by enjoying our competitive rates.

Quality Assurance

Quality is the responsibility of every Solvegen employee. To ensure a high quality of our services, a dedicated Quality Assurance team actively participates in all stages of the project development in order to ensure the consistency of the processes involved. Quality Assurance specialists reviews product specifications, carefully checks the product quality at each development stage, and make the final decision as to whether the product is ready to be delivered to the customer.