Categories
ASP.NET HTML Search Engine Optimization

How to enable press tab to search in Google Chrome and Mozilla Firefox on your website

Today, I learned something new while using StackOverflow in google chrome that it provides special area in browser’s address bar to search on the site even before you visit the site. I think this is very good feature as user can find the things very quickly on your site and get the expected output as soon as possible without having to see unnecessary details.

In image below you can see that I have enabled it for this site, it is visible in browser’s address bar and just below it you can compare it with the StackOverflow’s search in address bar.

Open Search on www.harshbaid.in
Open Search on www.harshbaid.in

 

Open Search on www.stackoverflow.com
Open Search on www.stackoverflow.com

You must be thinking that how to enable this for your own site or any other site that you are implementing, that is very easy task. You need to add OpenSearch XML on your site and link the OpenSearch XML document in html head section.

Example Usage

opensearch.xml

<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
    Example.com
    Example.com Search
    Search through Example.com

    UTF-8
    UTF-8
    false
    en-us
    open
    Example.com
    tag1,tag2

http://example.com/favicon.ico

Html link

Place the below html code inside <head> element section of the site.

opensearchdescription+xml" title="Example.com" href="http://www.example.com/opensearch.xml">

What is OpenSearch ?

And OpenSearch document consists of:

  1. OpenSearch Description files: XML files that identify and describe a search engine.
  2. OpenSearch Query Syntax: describe where to retrieve the search results
  3. OpenSearch RSS (in OpenSearch 1.0) or OpenSearch Response (in OpenSearch 1.1): format for providing open search results.
  4. OpenSearch Aggregators: Sites that can display OpenSearch results.
  5. OpenSearch “Auto-discovery” to signal the presence of a search plugin link to the user and the link embedded in the header of HTML pages

Find more about opensearch

Referenced From Stackoverflow

Enable pressing tab to search in google chrome on my website

 

Categories
.NET ASP.NET C# Winforms WPF

Getting started with Multifile assembly

What is Multi-file assembly?

It is an application assembly either web-based or desktop-based which spans across many files to support extensibility and dynamically adding new features.

What is Modules?

Modules means class files such as Program.cs or frmMain.cs, in context of assemblies.

Usage of Multi-file assembly

  • Using different modules written in different .NET based programming languages such as C#.NET and VB.NET .
  • To optimize an application by putting less used types in a module that is loaded only as when needed or required i.e Lazy-loading assemblies.
  • Reduce application start-up by loading only required assemblies at start-up and then load less used assemblies in background thread or parallel Task-based threads.
  • Extend the application features by implementing plugin-based architecture, like we have in Orchard CMS and NopCommerce for web-based applications and in StockTrader application for desktop-based applications.
  • We can incrementally release application features or fix a bug & release a patch without completely recompiling the main assembly or application.
  • For multi-language applications releasing new languages support via custom language module packages.

Conceptual example of Multi-file assembly

For example, you have an e-commerce web application at hand which supports online booking goods & payments also, you currently have an account in PayPal so you create a main package containing Payment related interfaces and then reference it back to main application and in package which will be containing the actually concrete classes for PayPal implementation. And then plan and release new packages with more payment gateways such as Authorize.NET at later stage. This is a working example and implemented in NopCommerce web application.
PS: I will come with a demonstration application for building real plugin-based applications in my future posts.

Advantages of Multi-file assembly

  • Desktop Application with plug & play architectures are benefited.
  • Change of application behavior or add more services at later stage in spiral SDLC model.
  • More number of developers can work concurrently on larger projects independently on assigned modules.
  • Supports agile application development approach.
  • Complex projects can be built easily by Separation Of Concerns.

Disadvantages of Multi-file assembly

  • Increases development time as developers need to write without being aware of the main application and needs to communicate with various teams while integrating as a whole.
  • Small-scale projects do not get its benefit as it would increase cost of development and time both.

Detailed steps to create and use multi-file assemblies can be found at AspAlliance.com article here and you can download sample from AspAlliance.com MultifileAssembly.zip

I would like if you would share your thoughts on this topic with me.

Thanks.

 

Related Articles & links:

Importing multiple extension assemblies in C# with MEF
Building a Multifile Assembly on MSDN
Managed Extensibility Framework