Accelerate your Sitecore project

Ariesnet Sitecore Accelerator

(888) 932-3375

info@ariesnet.com

Learn More

Ariesnet Sitecore Accelerator offers you several ways to save time and money on your Sitecore development, in the form of a code library written in pure C# for the .Net Framework 3.5.

  1. Send data from your web forms to a CRM of your choice
  2. Model-View-Presenter Framework
  3. Helpful Utilities

1. Send data from your web forms to a CRM of your choice

If you use the Web Forms For Marketers (WFFM) module and need to send your form data to an external CRM, like Salesforce or iContact, you will undoubtedly discover that you run into two problems:

  1. You need to write a custom Action to POST your form data to your external CRM.
  2. The field names you need to send to your CRM are very specific and not very user-friendly names (like lname or last_name). Unfortunately, out of the box, WFFM will use the user-friendly field names like “First Name” and “Last Name.”

Ariesnet Sitecore Accelerator provides the Custom Action to add to your Sitecore installation, which can perform a form POST using the data from the WFFM form you created. It uses a custom hidden field in the form to pick up the URL to which you wish to POST the form data to. Another custom hidden field allows you to define a response page to which the visitor will be routed upon completion of the POST, as an alternative to the default Success message.

It works with any CRM package that offers an HTTP POST API.

There is also a subset of field types, dubbed CRM field types, that include a new property not available in default Sitecore field types. This property (CRM Field Name) lets you define the name of the field that you want to post to your CRM. So for example, you could display “Last Name” to the visitor and send “last_name” to the CRM.

Field Types available include:

  1. Hidden Input
  2. Single Line Text
  3. Multiple Line Text
  4. Number
  5. Password
  6. Email
  7. CheckBox
  8. CheckBox List
  9. Date
  10. DropList
  11. ListBox
  12. RadioList

2. Model-View-Presenter Framework

There are many ways to render Sitecore data on a sub-layout. You can use Field Renderers for simple pages, but when you get into lists and need to use Repeaters or Grids, the job becomes much more complex. Pages get cluttered as data access and business logic commingles with presentation logic and all this prevents you from properly unit testing your code.

The Model-View-Presenter (MVP) is a respected model for creating separation of presentation logic and data retrieval logic, and it works well with ASP.Net pages where the Model-View-Controller model is not an option.

ASA contains an MVP Framework that can get you started for most types of pages and controls.

With it, you can create much simpler pages and controls, that have true presentation and data logic separation, can be unit tested and speed up development by an enormous factor, by allowing data logic to be refactored in the back-end without affecting the View. For example, if your Content Authors decide to change field types on you, you can simply change your code in the Presenter layer and leave the presentation logic intact. See our samples (included in the software package) for examples of utilization of the MVP pattern and how it can simplify, speed-up and clean-up your Sitecore code.

3. Helpful Utilities

In the course of developing a website, there are circumstances where several string operations are required. Ariesnet Sitecore Accelerator has included some of methods we have found most useful and missing in the .Net library stack.
There is a utility to trim a piece of text up to a certain maximum length, which takes into account whether the string is null or smaller than the maximum length. Several lines of code are wrapped for your convenience.

Another method can trim the text by adding an ellipse (…) at the end of the string, if the maximum length of the string was exceeded. This is convenient for Search results pages, summaries, news items, etc.

Sitecore comes with a powerful Media Library. If you want to list your files on a web page for your visitors to download (such as PDF's) it is sometimes helpful to display the file size. Unfotunately, out of the box, the file size is provided to you as an integer number. What if you want to display it in a format more easily read by humans?
If you need to display file sizes but don’t want to spend the time required to convert bytes to Kbytes or Mbytes, ASA contains a utility that automatically converts the bytes to the most appropriate string for you. For example, if the size is 2048 you will get 2KB. If the size is 1048576 you will get 1MB.

Need to strip HTML characters from a string? You can write your own Regex expression, or you can use our handy (and tested) StripHtml method. Save yourself the time and effort.

Parsing Sitecore fields can be a repetitive and time-consuming endeavor. Save yourself the time and many lines of code and use our tried and tested methods for retrieving field data from Sitecore Items.
Pass the Item to one of our many methods and you will retrieve in one line of code the data you need from text fields, date fields, number fields, image fields, file fields, link fields, drop down fields and many more.