Learn IT

Free learning anything to everything in Information Technology.

Technical Architecture

Technical architecture is a part of software architecture, which focuses on how to deal with certain aspects of the software engineering process. It allows us to design better systems by:
  • Meeting system requirements and objectives: Both functional and non-functional requirements can be prioritized as "must have", "should have" or "want", where "must have" identifies properties that the system must have in order to be acceptable. An architecture allows us to evaluate and make tradeoffs among requirements of differing priority. Though system qualities (also known as non-functional requirements) can be compromised later in the development process, many will not be met if not explicitly taken into account at the architectural level.

  • Enabling flexible partitioning of the system: A good architecture enables flexible distribution of the system by allowing the system and its constituent applications to be partitioned among processors in many different ways without having to redesign the distributable component parts. This requires careful attention to the distribution potential of components early in the architectural design process.

  • Reducing cost of maintenance and evolution: Architecture can help minimize the costs of maintaining and evolving a given system over its entire lifetime by anticipating the main kinds of changes that will occur in the system, ensuring that the system's overall design will facilitate such changes, and localizing as far as possible the effects of such changes on design documents, code, and other system work products. This can be achieved by the minimization and control of subsystem interdependencies.

  • Increasing reuse and integration with legacy and third party software: An architecture may be designed to enable and facilitate the (re)use of certain existing components, frameworks, class libraries, legacy or third-party applications, etc..

Service Oriented Architecture (SOA) - The Basics

SOA: the false, the ideal, the real
  • False: SOA equals web services.
    SOA equals distributed services.
  • Ideal: SOA cleanly partitions and consistently represent business services.
  • Real: SOA is a fundamental change in the way we do business.

Real SOA

  • Changed mindset: service-oriented context for business logic.
  • Changed automation logic: service-oriented applications.
  • Changed infrastructure: service-oriented technologies.
  • A top-down organization transformation requiring real commitment.

SOA Characteristics

  • Loosely coupled: minimizes dependencies between services.
  • Contractual: adhere to agreement on service descriptions.
  • Autonomous: control the business logic they encapsulate.
  • Abstract: hide the business logic from the service consumers.
  • Reusable: divide business logic into reusable services.
  • Composable: facilitate the assembly of composite services.
  • Stateless: minimize retained information specific to an activity.
  • Discoverable: self-described so that they can be found and assessed.

Potential Benefits

  • Based on open standards.
  • Supports vendor diversity.
  • Fosters intrinsic interoperability.
  • Promotes discovery.
  • Promotes federation.
  • Fosters inherent reusability.
  • Emphasizes extensibility.
  • Promotes organizational agility.
  • Supports incremental implementation.
  • Technical architecture that adheres to and supports the principles of service orientation.

Common Misperceptions

  • SOA is just Web services.
  • SOA is just a marketing term.
  • SOA is just distributed computing.
  • SOA is a magic global solution to general interoperability.

Common Pitfalls

  • Not basing SOA on standards.
  • Not creating a transition plan.
  • Not starting with a solid XML foundation architecture and skill set.
  • Not understanding SOA performance requirements.
  • Not understanding web services security.

Summing Up SOA

  • Not a magic trick.
  • Not a magic solution.
  • Not an easy thing to do correctly.
  • The wavelet of the present.
  • The wave of the future.
  • A useful architectural concept.
  • A potential business facilitator.

Resources

  • Douglas K. Barry, Web Services and Service-Oriented Architectures: the savvy manager’s guide.
  • Thomas Erl, Service-Oriented Architecture: concepts, technology and design.
  • Thomas Erl, Service-Oriented Architecture: a field guide to integrating XML and web services.

Disable Right Click On SharePoint Site

Follow these steps to prevent users from right-clicking in your sharepoint site.

  • Add a content editor web .
  • Add the following piece of code in the source editor of the content editor web part.

<HTML>
<BODY OnContextMenu = "return false;">
No Right Click on this Page.
</BODY>
</HTML>

  • Save the content editor web part.

Users are now prevented from the right click option on the page.

Reconnecting Content Databases in MOSS 2007

After the failover of a SharePoint Products and technologies database, it is required to reconnect the content databases. The following are the databases that are required to be reconnected,
  • Content database
  • Admin database
  • Configuration Database
  • Search Database
  • Shared Services Provider

The following stsadm commands are used to reconnect to the content database after a failover, the deletecontentdb will remove the reference to the old database server and the addcontentdb will add the new database as the content database

stsadm –o deletecontentdb –url [Site] -databasename -databaseserver [Old Principal]

stsadm –o addcontentdb –url [Site] -databasename -databaseserver [Old Principal]

Reconnecting content databases can also be done using Central Administration,

  1. Navigate to Central Administration.
  2. Navigate to Application management page
  3. Click on the Content Databases.
  4. Select the content database that has failed-over.
  5. In the Manage Content Databases page, choose the Remove content database option, and then click OK.
  6. Select the Add a content database option, and enter the required details.
  7. Replace the Database Server box with the new principal server, and then click OK.

Globalization In .NET

Globalization refers to the process with which an application or software will be designed and developed so as to make it run across all platforms and all sites with minimum or no modification to the software application. The software is very amenable to customisation so as to suit to the location-specific conditions and it is also capable of providing information based on the varied inputs and the location-specific operating system.Under any normal circumstance, there will be two processes in Globalization and they are customisation or localisation of the application and internationalizing the application codes so as to meet the standards of the local culture and other related matters.

In internationalization process the application code base will be same and the efforts will be on jobs such as translating, storing, retrieving and to make the application user friendly for the selected locale. In any given place the culture and the language will always be different and besides this you should also take into account the other factors such as time zone, normal date pattern usage, cultural and language environments, currencies, telephone numbers, and so many other factors that are specific to the locale.

In globalization the process of internationalization enables you to remove from the code base and the presentation layer all the contents and make you to use only a single presentation layer and single code base with a common contents that can suit any culture. The internationalization process will aid you to keep all the contents in a common place with an idea of making it easily accessible by the programme codes and the results can easily be populated all over presentation layer and the application with ease and efficiently.

In addition to the above, the internationalization process also enables you to store the contents and all the collected inputs from the user in a user friendly format and in a highly secured manner without compromising any standards pertaining to the local culture. The internationalization process is one step before any attempt for localising the application to suit to the local needs.

With the help of the localization process of globalization, you can make your application adaptable to the various location specific conditions and it will be easy for you to translate and re-format your application to suit to your new location and that too without changing any of the codes. Further, you can make use of the process for rectifying any of the reported bugs and for fine tuning the application for running smoothly without any hitch.

The globalization process also makes use of the locally prevailing information on culture where the software or the application is to be installed and maintained. The locational details and the language used in that particular area constitute to culture information and for working with any culture based information the namespace concept is utilised and the System.Globalization, System.Resources and System.Threading are the available namespaces in .NET Framework.

Out of the various namespaces, the System.Globalization namespace constitute classes that are used to hold information relating to region or country, the local language used, type of calendars, date format used, numbers, currency, etc., all in a meticulously arranged fashion and all these classes are used while developing the globalized (internationalized) applications.

You can use advanced globalization functionalities with the assistance of classes such as StringInfo and TextInfo classes and the various functionalities include text element processing and surrogate support systems.

The System.Resources namespace constitutes interfaces and classes that are very helpful for developers and maintenance experts in creating, storing, retrieving, and managing various resources used in the application that are culture and location-specific.

The System.Threading namespace constitutes interfaces and classes that aid in multithreaded programming. The classes that are used in this type of SystemThreading namespace are also useful in accessing data and for synchronization of thread activities.

Pros & Cons: Custom Templates and Site Definitions

Customization of site definitions holds the following advantages over custom templates:

  • Data is stored directly on the Web servers, so performance is typically better.
  • A higher level of list customization is possible through direct editing of a SCHEMA.XML file.
  • Certain kinds of customization to sites or lists require use of site definitions, such as introducing new file types, defining view styles, or modifying the drop-down Edit menu.

Site definition disadvantages include the following:

  • Customization of site definition requires more effort than creating custom templates.
  • It is difficult to edit a site definition after it has been deployed.
  • Doing anything other than adding code can break existing sites.
  • Users cannot apply a SharePoint theme through a site definition.
  • Users cannot create two lists of the same type with different default content.
  • Customizing site definitions requires access to the file system of the front-end Web server.

Custom templates hold the following advantages over customization of site definitions:

  • Custom templates are easy to create.
  • Almost anything that can be done in the user interface can be preserved in the template.
  • Custom templates can be modified without affecting existing sites that have been created from the templates.
  • Custom templates are easy to deploy.

Custom template disadvantages include the following:

  • Custom templates are not created in a development environment.
  • They are less efficient in large-scale environments.
  • If the site definition on which the custom template is based does not exist on the front-end server or servers, the custom template will not work.

Difference Between MOSS 2007 and WSS 3.0

It always astounds me what Microsoft are willing to bundle with their software, Analysis Services or SSIS (SQL Server Integration Services) with SQL Server for example! They haven't stopped, they bundle Windows Sharepoint Services with Windows Server 2003, with is basically a fully functional SharePoint Server, however they still have SharePoint Server 2007 as a product. So what are the differences? At first glance it doesn't appear to be much, however for tight integration into the enterprise, it seems that MOSS 2007 (Microsoft Office SharePoint Server) is a must! I will highlight the most interesting bits that MOSS 2007 has over and above WSS 3.0 (Windows Sharepoint Services) :
  • User Profiles support - Allows each user to store profile information

  • Site Manager - Manage Navigation, Security and look and feel with drag an drop functionality

  • Enterprise Search Tools - numerous tools to search Sharepoint Sites and Portals across entire enterprises

  • Business Data Catalog - The Business Data Catalog (BDC) tightly integrates external data, providing access to external data residing within other business applications, and enabling the display of, and interaction with external data

  • Business data search - Search data residing in your business applications using the BDC

  • Business Data Web Parts - Used for viewing lists, entities, and related information retrieved through the Business Data Catalog

  • Business document workflow support - Automate document review, approval, signature collection, and issue tracking using workflow applications

  • Retention and auditing policies - Allows customized information management policies to control retention period, expiration, and auditing

  • Browser-based forms - Integration with InfoPath, allows integration on to SharePoint of created forms and surveys.

  • Integrated, flexible spreadsheet publishing - Allows information workers to easily choose what they want to share with others and determine how others can interact with published spreadsheets.

  • Share, manage, and control spreadsheets - Provides access to spreadsheet data and analysis through server-calculated, interactive spreadsheets from a Web browser. Can help to protect any sensitive or proprietary information embedded in documents, such as financial models, and audits their usage.

  • Web-based business intelligence using Excel Services - Allows spreadsheets to be broadly and easily shared. Fully interactive, data-bound spreadsheets including charts, tables, and PivotTable views can be created as part of a portal, dashboard, or business scorecard.

  • Data Connection Libraries - Document Libraries storing ODCs (Office Data Connections), Making one single location for all data connections.

  • Business Data actions - Easily create actions that open Web pages, display the user interfaces of other business applications, launch InfoPath forms, and perform other common tasks.

  • Integrated business intelligence dashboards - Rich, interactive BI dashboards that assemble and display business information from disparate sources by using built-in Web parts, Excel spreadsheets, Reporting Services, or a collection of business data connectivity Web Parts.

  • Report Center - Provides consistent management of reports, spreadsheets, and data connections.

  • Key performance indicators - A KPI web Part can connect to Analysis Services, Excel Spreadsheets, SharePoint Lists, or manual entered data.

  • Notification service - Improved allowing workflow users to receive emails by default, and improved triggering and filtering

  • Single Sign-On (SSO) - Allows the User to log onto a variety of applications with a single user name and password, therefore integrating back office applications, and helps pre-population with integration to the Profile part of MOSS 2007.

  • Social Networking Part - Connect to Public My Site pages to help establish connections between colleagues with common interests

  • Personal Site Support - Allows Users to create Personal Web Sites

  • Content syndication - Use RSS feeds to syndicate content managed in a portal site.

Create an IE Favorite to quickly resize your browser

Often times when editing or designing a web page or a site I use my full screen to take advantage of all the realestate my screen has to offer. I also often times need to quickly see what a page will look like in a smaller screen resolution such as 1024x768.
Here is a quick tip to quickly and easily resize your IE browser to a specific size.

  • Create a shortcut in your IE Favorites or in you Links folder.

  • Rename this shortcut/favorite to "Resize Window to 1024x768".

  • Edit the properties of the shortcut and place the following line of javascript in the URL property.
    javascript:window.resizeTo(1024,768)
    Note: You will receive a warning prompt. Simply proceed.

  • Save the properties and then click your new favorite Resize Window to 1024x768.

Your current window should now automatically resize to 1024x768. You can change this to 800x600 or whatever size you need.

Apply a Theme to all sub sites in SharePoint 2007

Apply a Theme to all sub sites:(works for MOSS 2007 only, not WSS 3.0)

  • Change the top site to the theme of your choice using the normal method in Site Actions > Site Settings > Site Theme.

  • Navigate to the top site to see the newly applied theme.

  • View the HTML source of the SharePoint page using the theme you want.

  • Look for a link tag containing the .css file for the applied theme. It will look something like this:

<link rel="stylesheet" type="text/css" id="onetidThemeCSS" href="/apps/afe/_themes/Belltown/Bell1011-65001.css?rev=12%2E0%2E0%2E4518"/>

  • Copy the href value to your clipboard or to a text file if you like. It should look something like:/apps/afe/_themes/Belltown/Bell1011-65001.css

  • On your top level site, go to the Site Actions > Site Settings > Master Page screen. Scroll to the bottom where the Alternate CSS URL section is. Select the "Specify a CSS file..." option.

  • Paste the path copied from the href above into the text box.

  • Check the Reset all sub-sites to inherit this alternate CSS URL option.

  • Click OK.

  • Navigate to your sub-sites and verify the theme has been applied.

We Developers Do the Dumbest Things

Ever do something really stupid in your code? I bet you can't say "No" with a straight face. But, don't you get irritated when you encounter someone else's blunders. I have found some real dillys lately and thought I might run them by anyone that ever reads my blog, which at this point is not a lot of people.

It seems that a lot of self-named .NET developers totally don't understand Exception Handling!

For example, explain the need for the following Try Catch block, if you can.

private void DoNothing()
{ try
{
// do some code
}
catch(Exception ex)
{
throw(ex);
}
}

Did it never occur to the writer of this code that if they had not coded the try catch, that the results of a failure in the DoNothing method will be exactly the same. The try catch as coded basically is an unhandled exception, which could have been raised without the try catch.

Here's one more that completely baffled me when I came upon it recently.

Try
IO.File.Move(oldPath, newPath)
Catch (ex As Exception)
IO.File.Move(oldPath, newPath)
End Try

Go Figure! What is this? "If at first you don't succeed, Try, Try again?"

Take a minute and comment with something really dumb that you have done or seen.