Posts Tagged ‘microsoft dotnet’

Creating a custom section using Umbraco

Saturday, August 14th, 2010

Umbraco is an open source CMS (content management system) based on Microsoft ASP.NET.

The unique features  that distinguishes Umbraco are :

-It is a CMS that can support any modern browser

-It allows editing  on  Microsoft Word.

-It is a source where designers can create accessible and valid xhtml without using  mark- up conventions.

- Developer 's can integrate any sort of control based on .NET platform.

Umbraco's administration area is divided into different sections. In order to add bespoke functionality to the Umbraco platform ,a custom section has to be built.

For Instance,  Let us create a sample 'Invitation sending ' functionality in Umbraco platform.

Steps to be followed :

  • Let the custom section  be  named  “Invitation”
  • Add the information about the custom section to Umbraco database, in three specific tables.
  • First , add  entry on to the umbracoApp table where  the created sections are stored

  • Next  add an entry to the umbracoAppTree table. This will display  custom section “Invitation” as the top level item on the tree.

  • Give  administrator  the permission to access the Custom section, so  add  entry to the umbracoUser2app table as  shown.

  • Next we have to create an icon which defines  the custom section. The  image  can be created using Photoshop that fits into the Umbraco Administration panel. Next place the image under the umbraco\images\tray\ folder. Make sure that the image name is same as defined in umbracoApp table.
  • Since Umbraco supports several languages, we need to register  entry to the languages file. located under umbraco\config\lang folder. Please add the following  to  en.xml file.

  • Next  step is creating a  web application called MyCustomAssembly .
  • For this create files  ,sendInvitation.aspx and listInvitation.aspx . Here we  add the required logic to implement the functionality. Place both the files in a new folder “Invitation” , created under the Umbraco folder.
  • Next create a class named “loadInvitation.cs” which contains the logic to list the custom tree node structure and respective actions and the coding  for mat  for this  is:

  • Now add the created custom dll on to the bin folder under Umbraco root installation .
  • Desired  Custom Section is thus created & the screen image will appear as shown.

After following the above given steps,  refresh the Umbraco section page . You can see the Custom section called “Invitation” displayed  and further clicking  on  'Invitation ' section , you can see a tree structure on the left pane displaying the 'send invitation ' and 'list invitation' child nodes.

We  will be  back with  detailed post on Umbraco customization  from developer's  perspective  in  future.

    Using profile property in ASP.NET

    Thursday, March 11th, 2010

    When using the Membership API in the .NET Framework, only the core properties related to a user account is stored.  To add additional properties to a user’s account, we need to customize the database to store the additional information. But a much simpler work around is available by using the

    Profile properties are used in applications where you need to store and use information specific to each user. It can be used when you need to present the user with a personalized webpage according to his country, preferences or other factors. You can store this information in the session, but this will lead to the user preferences being lost when the session times out or if the user logs out of the system. By using profile features we can store user specific information in a persistent way because each time a user logs in, additional information regarding the user is stored to the database. So the next time a user visits the site, this information can be fetched from the database as and when needed.

    In order to be able to use the profile properties, you need to configure a profile provider. The default provider available in the .NET framework is the SqlProfileProvider. 

    To operate the profile properties you need to create a SQL database to hold the data. You can create the database by running the Aspnet_regsql.exe command. You can find it here- C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe.

    Here we can select a particular database to apply the profile properties. If we do not specify a particular database, a new database is created with the name ‘aspnetdb’

    To start using the profile properties in your web application you need to configure it in the web.config as follows.

    For each property, you can specify the name, data type, and how the data should be serialized. There are four serialization options:

    • ProviderSpecific (by default) – the profile provider is left to determine how to serialize the property value
    • The property value is converted to a string.
    • The property value is converted to an XML representation.
    • The property value is converted to a binary representation.

    Eg:-

    <configuration>
           <system.web>
              <profile>
                 <properties>
                    <add name="Gender" type="System.Boolean" allowAnonymous="true"/>
                 </properties>
              </profile>
           </system.web>
    </configuration>

    The element adds a Profile property named 'Gender' of type Boolean and serialized as chosen by the Profile provider. There are additional attributes that can be included in the element, such as defaultValue and readOnly, among others. You can also group properties as follows,

    Here two profile properties, Gender and MaritalStatus are grouped under UserDetails.

    <configuration>
           <system.web>
              <profile>
                 <properties>
                    <group name="UserDetails">
                        <add name="Gender" type="System.Boolean"/>
                        <add name="MaritalStatus" type="System.String"/>
                    </group>
                 </properties>
              </profile>
           </system.web>
    </configuration>

    Using Profile Properties in Code

    Once the Profile properties are defined, the ASP.NET engine automatically creates a ProfileCommon class that has properties that map to the properties defined in the Web.config. The custom ProfileCommon class is accessible in the code portion of an ASP.NET page through the HttpContext object’s Profile property.

    So for reading the Profile property set for the currently logged in user, say Gender, just use Profile.Gender. In fact, as soon as you type in and hit period, IntelliSense brings up the various properties.> For accessing a grouped property, type in the Profile name followed by the group name and the property, for example, Profile.UserDetails.MaritalStatus

    We can assign values to profile properties as,

    Profile.Gender = true;
    Profile.UserDetails.MaritalStatus = "Single";

    We can read values stored to profile properties as,

    bool gender = Profile.Gender;
    string maritalStatus = Profile.UserDetails.MaritalStatus;

    The SqlProfileProvider stores the Profile property values in the table in a SQL Server database. It automatically handles all of the serialization and deserialization work and all that is left for us to do is programmatically read from and write to the user's Profile data through the profile property

    By .NET Team, Software Associates

      Microsoft dotnet Technologies

      Wednesday, April 22nd, 2009

      T4 code generation approach for faster project deliveries.

      Over the last 10 years, we have built considerable expertise in ASP.NET web application development using ASP.NET 2.0/3.5, AJAX, payment gateway integration using Worldpay, paypal etc to build complex intranets and ecommerce applications for web development.

      Third party components, controls and tools like ABCpdf.net, Aurigma Mass Image uploader are used commonly by our aspnet web development team. We also have expertise in tools like Silverlight and Sharepoint Server 2007

      • Data Access Layer using custom objects or typed data sets based on the project requirements.
      • Middle tier abstract for business layer
      • Provider Independent Data Access Layer using ADONET provider pattern.
      • Custom controls by inheriting existing controls or creating compound controls and components
      • ASPNET 2.0 Security, Membership, and Role Management – Implementation
      • ASPNET page level and data level caching to boost application performance
      • Domain objects serialized into XML and persisted in database.
      • Image and Graphics programming. in C#
      • ASPNET themes for skinning websites
      • Microsoft excel manipulation – Read and Writing excel files
      • Custom windows services using C# managed code
      • Active directory accounts authentication system for ASPNET intranet web application
      • Communication using MSMQ

      ASPNET Ajax:

      • ASPNET Ajax Control Tool Kit
      • ASPNET Ajax UI Effects – UI manipulations like Drag n drop, sorting, reordering, resizing and pagination.
      • ASPNET Ajax Custom Control Extenders – Developing custom client components using AJAX framework.
      • Script globalization and localization using AJAX framework.
      • Web services and page methods using JavaScript and ASPNET AJAX.
      • ASPNET Page method – To implement popular JavaScript frameworks and scripting libraries like JQuery.
      • Prototype and YahooUI.

      SQL Server 2000/2005/2008:

      • Database design.
      • Normalization.
      • Query Optimization.
      • Stored Procedures.
      • User defined functions.
      • Crosstab queries.
      • Site Search implementation using Full Text Catalog and Indexing.

      Payment Integration:

      • PROTX
      • WorldPay
      • Paypal
      • Authorize.NET
      • Google Checkout
      • HSBC API / CPI

      Third Party Components, Controls and Tools:

      • ABCpdf.net.
      • netCharting.
      • Aurigma Mass Image Uploader.
      • PDFBox – .NET Version.
      • iText.NET.

      Other Frameworks and Script Libraries:

      • Jquery
      • Lightwindow
      • Scriptaculous
      • Prototype
      • Yahoo UI
      • Google Map Geo coding based on UK Post Codes
      • Open ID Integration
      • Social Bookmarking
      • Open Source CMS Integration – Umbraco
      • ELMAH: Error Logging Modules and Handlers – To log, handle and mail runtime errors.

      ASPNET 3.5:

      • URL Rewriting and routing
      • ASPNET Dynamic data using scaffolding framework (Full CRUD operations supported)
      • History Control, Drag overlay extender, Media Control, XAML and Web Part manager,
      • LINQ
      • Powerful URL mapping component that enables to build applications with clean URLs.
      • REST-friendly naming patterns.
      • Silverlight – application using WCF service

       

      Our Microsoft aspnet web application team practices continous integration and agile scum methodologies to build enterprise web applications for our associates spread across London, New York, Washington and Seattle.

      Read about our Microsoft dotnet case studies

      To have a no obligation quote please click following link Contact Us.

        MbUnit , NHibernate and Castle

        Tuesday, October 28th, 2008

        MbUnit : a Unit test framework for the .NET Framework. can be used here as a Unit testing framework for this ASP.NET MVC

        NHibernate : is an Object-relational mapping (ORM) solution for the Microsoft .NET platform: it provides an easy to use framework for mapping an object-oriented domain model to a traditional relational database. NHibernate acts as a Object Relational Mapper (ORM) in the ASP.NET MVC. But we can also have the LINQ to SQL provided by Microsoft in place of NHibernate.

        Castle: Castle is an open source project for .NET for developing web applications based on MVC pattern. Castle is an opensource project at this moment purely based on MVC pattern.

        MVC is a framework methodology that divides an application's implementation into three component roles: models, views, and controllers.

        "Models" in a MVC based application are the components of the application that are responsible for maintaining state.

        "Views" in a MVC based application are the components responsible for displaying the application's user interface.

        "Controllers" in a MVC based application are the components responsible for handling end user interaction, manipulating the model, and ultimately choosing a view to render to display UI.

        dotnet team @ Software Associates

          Microsoft aspnet case studies

          Sunday, March 9th, 2008

          Recent .NET projects done by our dedicated offshore web application development team for clients in United States and United Kingdom.

          Event Management – London

          Our client wanted an enhanced event management system by incorporating a dynamic form building functionality. The existing system had a form building option developed in legacy scripting, which was not flexible enough to create forms with varied controls and validations.

          The admin users needed to design forms dynamically based on the information collected from the users for an event registration. The form controls added had be made mandatory and also be given the required validations. There was an option to format the title and descriptions of the form using HTML editor. Admin is able to reposition the form elements easily and update the form design. The system should also track the number of registrants for each form generated for these events.

          The client application was developed in ASP.NET 2.0 using C#. A layered architecture using Object Oriented method was followed strictly for the project. This made the system highly extensible and maintainable. New features in .NET 2.0 like master pages and generics were extensively used. By using generic object collections, runtime type conversion errors could be avoided.

          Restaurant booking system – London

          A flash based interactive website for a popular speciality restaurant in North London for their clients to make online booking for tables. The data had to be synchronised from an existing Php/Mysql CRM database.

          Flash enabled controls and components. Actionscript files for event handling and query generation. Custom built user components and controls for alerts,buttons, input, check and text boxes. ASP.NET Web service for general data retrieval method to accept XML stream and parsed into an SQL. Customer database table search with the help of regular expressions. Connectivity through data provider for MySQL

          Telecom component branding website – London

          A tool for the existing website to compare features of compatible products. Features: Option to select the product that customers currently use, which populates another list of compatible headsets and on selecting a compare option; Customers can view the features of the products.

          Secure admin to manage product features and linking compatible products. DataGrid control of .NET was put to use extensively for this purpose, which enabled faster and reliable application development.

          Extranet for airline catering company – London

          Website that manages and sells meal plans. Highly advanced WYSIWYG content management system to add meal plans and link it with them with recipes, food etc. An efficient Boolean search functionality with twenty-five filter parameters to search from over a thousand meal plans and their recipes. Custom built data listing functionality to show recipe ingredients and their alternative ingredients as child nodes with root as main ingredient in dynamically created and loaded UI controls. Custom developed tree view functionality to show registrants and weekly allotted meal plans.

          All words in the web pages that have an explanation in the glossary will be dynamically linked to the library section. A layered popup showing a small description with read more hyperlinks will be shown when the mouse is over the linked word. Regular expressions used while page rendering to develop this functionality. Compatible with web browsers such as IE 7, Firefox 1.5, Safari, Mac IE and Opera.

          Windows service for allotting the meal plans on a weekly basis and email subscribers who were allotted these plans. Seven step user-registration process that ends with an online payment option. Customized view and functionalities based on the membership privileges. Print, Email and SMS features included for high-end memberships. Complex allocation procedure that filters the meal plans based on user profiles, ingredients, cost, dietary requirements, and food timings. Selected pages are accessible through small screen browsers (PDA / PocketPC).

          Portal for holiday rentals – Brighton, United Kingdom

          Website that lists villas for rent worldwide. Mail manager module to send mail alerts, mail broadcasts etc to users and villa owners. Fully SSL certified to facilitate credit card information storage. Bulk newsletter managing module. Registered villa owners have the option to choose their own mini-site from a list of template designs and dynamically create sub domains of the site.

          Online villa booking option. Integration with villa owner's Paypal account. Custom made dynamic image manipulation class files to load, compress and display in a custom manner on the web pages for latest property images uploaded by villa owners. Flash banner showing newly added villas by reading information from a dynamically generated XML file. AJAX enabled quick jump combo box options. Advanced search option with numerous filter parameters.

          Forecasting tool for global chocolate vendor – Washington, USA

          Web application for displaying foresights, trends and observations. A content management system developed very efficiently with extensive use of web controls under .NET framework. User-friendly design to cross-link related data easily.

          Extensively built using custom user controls to make the site modular so that changes to any part of the site can be done easily. Dynamically loading tree showing foresights as root node, trend as first level child and observation as second level child. Very fast and scalable boolean search.

          Soccer hats eCommerce – London, United Kingdom

          A site selling soccer fan hats. Features: Payment Integration with PROTX. Site was developed on the fly with in-house developed database manipulation class files.

          Clothing retailer extranet – London, United Kingdom

          Requirement: An Extranet accessible by the company, its suppliers and factories. Features: Complex data analysis and report generation done with extensive use of Cross-Tab feature in SQL Server 2000.

          • All database operations are implemented as stored procedures to make application faster.
          • Reports are highly customizable with option to select up to five year time span.
          • Admin e.mail notification detailing the changes made by suppliers or factories on an order.
          • All updates are logged to enhance extranet security.
          • Option to download the reports as Excel file.
          • Easy printing for huge reports in to a number of pages
          • Scale to any paper size.

           

          Read about our portal building expertise