All Articles

 

How should we use design patterns? - We have to load design patterns in our memory (as many as possible). So that we can recognize places during our design where we can apply them. Design pattern is not reusing code rather it is reusing the experience.

 

Though manual testing gives us more accuracy to find out the critical issues but for some cases we have to depend on automated testing to find out few simple issues, which cannot be found by manual testing. Here is a simple example:

We can easily verify text, elements by Selenium IDE. In my applicatiion there is long date shown. This is how I make sure my date format is ok and shown in correct format.

Note: some part of above image is blurred. 

Here is the explanation:

\w{6,9} = it checks Saturday - Friday. Wednesday is the longest one which has 9 characters and smallest one has 6 characters.

Already we have developed a number of web based applications and most of them are Drupal oriented. Though we have a enormous support of rich contributed modules to satisfy different business logics but often we need to build custom modules to fulfill the whole process flow.

During these custom modules development, we need to consider the following code practices which might help to reduce the vulnerable situations:

Sometimes we need to use address components in our applications specially when a user do registration or fill-up certain forms where s/he needs to put address informations like city, state, country etc. Google MAP API provides several good and handy features those may help to enrich these sections.

Here is the sample code for autocomplete adddress fields using Google Places API. Why we are using this API is because we no longer need to use any additional database for city-country-state.

I know most of us know this feature and use this feature to save time, but some may have like me don't know this, this post is for them.

Every day we have to send some common type of email where most of the text are common. some particular section goes changes. For example Fix Mail, each developer needs send for each task when completed. We have to write the same thing like

 

FIXED by Xxxxxx

This task has been fixed: xxxxxxxxxxxx
Summary: xxxxxxxxxxxxxx
Url: xxxxxxxxxxxxxxx
Process Flow: xxxxxxxxxxxxxxxx

Sometimes for a short-content page the footer climbs up and leaves a blank space at the bottom of the page. This looks ugly when content becomes small in height. But, as the name depicts itself, footer should be at the foot/bottom of the page. This post will help you tune the page and css to make the footer stick to the bottom regardless of content height. Not to mention, the footer will go down like normal when content exceeds the view-port height. The solution is to force the footer down to the bottom of the page for smaller contents.

I think some things need to care if I want our code is unit testable:

      * Dependency need to manage property(need to follow dependency injection principle).

      * Our Components should be isolated as much as possible though we can test component independently.

      * Need to follow single responsibility principle though we can easily test. Not too much/un-related

        Responsibility set to a class/method.

 

As a today’s Software development Domain Driven Design(DDD) is so much popular development methodology then others. It handles Software complexity

so smartly and efficiently. It is recommended to use this methodology for  big and complex software project development specially which are develop iterative

way. In our opus project it is partially implemented by refactoring process. In our opus data access layer it is implemented. Hope in

future it will implement in Business layer and common layer(infrastructure layer) as well.

We know that normally we can create a teplate file based on the name of the page.

Suppose there is a page named A. Then if we need to create a different template for this page, then we simply have to create page-A.tpl.php file in the sites/all/themes/{sitename}/.

Suppose we need to make the template such that any part of the alias can be used to make a template file.

For example:

abc/sales/top-list

abc/sports/recent-scores

If we want to make a separate templates for sales pages and sports pages, how can it be possible?

Pages

Subscribe to All Articles