<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel xmlns:blog="http://www.dotnetnuke.com/blog/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
    <title>Peter's Blog</title>
    <description>In this blog Peter goes over various architectural and design elements of Axxerion IWMS/CAFM </description>
    <link>http://www.axxerionusa.com/Blog/Blog/tabid/125/BlogId/4/Default.aspx</link>
    <language>en-US</language>
    <webMaster>info@axxerionusa.com</webMaster>
    <pubDate>Thu, 17 May 2012 01:59:20 GMT</pubDate>
    <lastBuildDate>Thu, 17 May 2012 01:59:20 GMT</lastBuildDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Blog RSS Generator Version 4.0.0.0</generator>
    <item>
      <title>Axxerion Script for customizing a SaaS application</title>
      <link>http://www.axxerionusa.com/Blog/Blog/tabid/125/EntryId/8/Axxerion-Script-for-customizing-a-SaaS-application.aspx</link>
      <description>&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;div&gt;Acquiring software for running a business is one of the greatest challenges for a company. There are many vendors, with many different products, with a wide variety of capabilities. Choosing the application that fits your company is difficult not in the least because there is no 100% fit. An organization is often required to reorganize to fit the software they bought.&lt;br /&gt;
 &lt;/div&gt;
&lt;div&gt;The alternative is to have the software adapted to the buyer. But this can turn out to be an expensive undertaking as well. First you have to acquire the software, and then you need to hire people specialized in the product to customize it to your requirements. They set to work and after some time, they deliver a product that is more or less to your specifications. In the meantime, you’ve been left in the dark as to the feasibility and progress. And more often than not, you are disappointed by the end.&lt;br /&gt;
&lt;br /&gt;
You could also have the software completely custom made, but this is only slightly different from adapting a standard product. You don’t have to buy the initial software, but you still end up paying for an entire application. Your ability to formulate the requirements into great detail is taxed to the limit and then you may still end up getting something very differently from what you had envisioned.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Traditionally Software-as-a-Service falls in the first category of applications. You get what you buy, nothing more, and no way to adapt the software to your needs. There may be some options, but they will be limited in number and functionality. If you really want that one feature, you end up paying for it, and it could take months before its implemented.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Modern Software-as-a-Service applications have a greater degree of customization capabilities. Adding extra fields to objects and customizing the screens is what the customer wants. And these modern applications provide this functionality. However, they do not allow you to adapt the business logic that allows you to fully harness these new fields. You can add the fields, put them on the screen, put in some data, but the business logic remains the same.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;In Axxerion we have made the next step. In Axxerion, the business logic can be adapted to your needs, to suit your organization. We fully support your custom fields, allowing these fields to be calculated automatically through a powerful scripting tool that also allows the creation of new objects completely initialized according to your specifications.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;You will probably ask yourself in what way is this different from the second category of applications? You have to buy a license to use Axxerion, and then you need to hire someone to customize the product? The difference is that in Axxerion, the customizations are done directly in the running application. Usually they can be done by one person in a relative short time, often in a matter of hours or days. And they are done by a person on your team or a consultant  whome you talked to when you specified the requirements, not some anonymous programmer that you never get to see.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;This has a huge impact on the time required to implement a change and on the cost involved.  Moreover,  when you are confident that the consultant understands your requirements, than you can be confident that we can deliver what you want. Your ideas are not lost in translation; they are passed from one human to another and then are implemented directly and quickly. And that makes all the difference.&lt;/div&gt;
&lt;h2&gt;The Power of Axxerion Script&lt;/h2&gt;
&lt;div&gt;Axxerion script is a scripting language, custom made for Axxerion. Execution is done by interpreting the code. To make Axxerion Script fast, the script is compiled and the compilation result is cached. If a change is made to a script, we simply remove the compilation result from the cache, causing the next execution to compile and run the new version.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Axxerion Script is similar to JavaScript and uses the same conventions and syntax. But we have thought carefully on the functionality that we expose. We do not allow writing e a script that can disrupt service or damage a customer’s data (neither yours nor someone else’s). And because of this, we fully support your customizations.&lt;/div&gt;
&lt;div&gt;Let’s look at some of the powerful features that Axxerion Script offers.&lt;/div&gt;
&lt;h2&gt;Access to the Database&lt;/h2&gt;
&lt;div&gt;Axxerion Script allows querying of the database, can fetch objects from the data store and manipulate these objects (modify them) in a domain specific way. Most scripts are run from within the context of an object for instance, and that object is available in a variable called &lt;font color="#c0504d"&gt;this&lt;/font&gt;. The user that is using Axxerion when the script runs is available in a variable called &lt;font color="#c0504d"&gt;user&lt;/font&gt;. Through these variables, it is possible to modify the (custom) fields of the object. For instance:&lt;br /&gt;
 &lt;/div&gt;
&lt;div&gt;&lt;font color="#76923c"&gt;&lt;font size="+0"&gt;# Set the fromContactId to the current user’s contactId&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="+0"&gt;&lt;font color="#c0504d"&gt;set this.fromContactId := &lt;font color="#c0504d"&gt;user&lt;/font&gt;.contactId;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color="#76923c"&gt;&lt;font size="+0"&gt;# Also calculate a value for the customer-total&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="+0"&gt;&lt;font color="#c0504d"&gt;set this."customer-total" := &lt;font color="#c0504d"&gt;this&lt;/font&gt;.amount * &lt;font color="#c0504d"&gt;this&lt;/font&gt;.quantity;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Besides modifying the fields, you can also fetch data from the database and iterate over the fetched objects. A fetch is done with a &lt;font color="#c0504d"&gt;find by&lt;/font&gt; expression and with &lt;font color="#c0504d"&gt;for each&lt;/font&gt; it is possible to construct a loop.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;font color="#76923c"&gt;&lt;font size="+0"&gt;# Find the workorder items of this workorder&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="+0"&gt;&lt;font color="#c0504d"&gt;var items = &lt;font color="#c0504d"&gt;find&lt;/font&gt; WorkOrderItems &lt;font color="#c0504d"&gt;by&lt;/font&gt; workOrderId == &lt;font color="#c0504d"&gt;this&lt;/font&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color="#76923c"&gt;&lt;font size="+0"&gt;# Iterate over the items&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="+0"&gt;&lt;font color="#c0504d"&gt;var amount = 0;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="+0"&gt;&lt;font color="#c0504d"&gt;for each item &lt;font color="#c0504d"&gt;in&lt;/font&gt; items {&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="+0"&gt;     amount = amount + item.amount;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="+0"&gt;}&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="+0"&gt;&lt;font color="#c0504d"&gt;set this."customer-amount" := amount;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;p&gt;The find by expression leverages the powerful features of the Axxerion filter queries. In most cases you just want to perform a simple search in a script, but Axxerion filters, and therefore scripts as well, allow sophisticated filtering options like text searches containing a certain subtext. The resulting collections can be further filtered or added to with simple operations like plus and minus. They can also be sorted in multiple fields. Simple collections can be created manually and these support sorting and iterating as well. From a text field or variable you can even create a collection with the simple but powerful &lt;font color="#c0504d"&gt;split&lt;/font&gt; command.&lt;/p&gt;
&lt;p&gt;From an object, you can also navigate to related objects; these objects can be modified as well.&lt;br /&gt;
 &lt;/p&gt;
&lt;p&gt;&lt;font color="#76923c"&gt;&lt;font size="+0"&gt;# Set a field in a related object&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;
&lt;font size="+0"&gt;&lt;font color="#c0504d"&gt;var person = &lt;font color="#c0504d"&gt;this&lt;/font&gt;.toContactId.personId;&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;
&lt;font size="+0"&gt;&lt;font color="#c0504d"&gt;set person.firstName := &lt;font color="#c0504d"&gt;this&lt;/font&gt;."customer-newFirstName";&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;
&lt;font size="+0"&gt;&lt;font color="#c0504d"&gt;set person.lastName := &lt;font color="#c0504d"&gt;this&lt;/font&gt;."customer-newLastName";&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;h2&gt;Creating New Objects &lt;/h2&gt;
&lt;div&gt;More interesting is to create new objects, based on the current object. For instance, suppose that we want to create a contact if someone fills in a request form on an intranet page. When the request is submitted by the user, a contact for that user should be created. This would work as follows:&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;font color="#76923c"&gt;&lt;font size="+0"&gt;# This script is executed on submit of a particular request&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color="#76923c"&gt;&lt;font size="+0"&gt;# First check that the person does not already exist&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="+0"&gt;&lt;font color="#c0504d"&gt;var contacts = &lt;font color="#c0504d"&gt;find&lt;/font&gt; Contacts &lt;font color="#c0504d"&gt;by&lt;/font&gt; email = &lt;font color="#c0504d"&gt;this&lt;/font&gt;."customer-email";&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color="#76923c"&gt;&lt;font size="+0"&gt;# Check if we found any contacts&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="+0"&gt;&lt;font color="#c0504d"&gt;if &lt;font color="#c0504d"&gt;isEmpty&lt;/font&gt; contacts {&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color="#76923c"&gt;&lt;font size="+0"&gt;     # FRM-000123 is a reference for a contact category folder&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="+0"&gt;     &lt;font color="#c0504d"&gt;var person = &lt;font color="#c0504d"&gt;create&lt;/font&gt; Person;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="+0"&gt;     &lt;font color="#c0504d"&gt;var contact = &lt;font color="#c0504d"&gt;create&lt;/font&gt; Contact &lt;font color="#c0504d"&gt;in&lt;/font&gt; "FRM-000123" &lt;font color="#c0504d"&gt;by&lt;/font&gt; person;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="+0"&gt;     &lt;font color="#c0504d"&gt;set contact.email := &lt;font color="#c0504d"&gt;this&lt;/font&gt;."customer-email";&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="+0"&gt;     &lt;font color="#c0504d"&gt;set person.firstName := &lt;font color="#c0504d"&gt;this&lt;/font&gt;."customer-firstName";&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="+0"&gt;     &lt;font color="#c0504d"&gt;set person.lastName := &lt;font color="#c0504d"&gt;this&lt;/font&gt;."customer-lastName";&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color="#76923c"&gt;&lt;font size="+0"&gt;     # Set the fromContactId&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="+0"&gt;     &lt;font color="#c0504d"&gt;set this.fromContactId := contact;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="+0"&gt;} &lt;font color="#c0504d"&gt;else {&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color="#76923c"&gt;&lt;font size="+0"&gt;     # Set the fromContactId to the first contact found&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="+0"&gt;     &lt;font color="#c0504d"&gt;set this.fromContactId := contacts &lt;font color="#c0504d"&gt;get&lt;/font&gt; 1;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="+0"&gt;}&lt;/font&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;In Axxerion a contact is either a contact for an organization (the contact is linked to an organization) or it is a contact for a person (the contact is linked to a person). Creating an object in the context of another object, will in most cases automatically link these objects. Therefore we don’t have to explicitly link the person to the contact and vice versa. We do have to create objects in the correct order.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Axxerion Script can be activated automatically on user actions, by associating a script with a certain (administrative) object. You can associate scripts to the following:&lt;/div&gt;
&lt;div&gt;&lt;span&gt;·&lt;span&gt;         &lt;/span&gt;&lt;/span&gt;to objects, causing scripts to be run on creation, update and/or delete;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;·&lt;span&gt;         &lt;/span&gt;&lt;/span&gt;to fields, causing the script to be run when the value of the field changes;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;·&lt;span&gt;         &lt;/span&gt;&lt;/span&gt;to workflow connectors, causing scripts to be run to determine if a connector is allowed or to change values when a connector is chosen;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;·&lt;span&gt;         &lt;/span&gt;&lt;/span&gt;to import connectors, causing scripts to be run prior to or after an import;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;·&lt;span&gt;         &lt;/span&gt;&lt;/span&gt;to page functions, causing scripts to be run when the user presses a button;&lt;/div&gt;
&lt;h2&gt;Conclusions&lt;/h2&gt;
&lt;div&gt;Axxerion is a SaaS solution addressing the Facilities and Workplace management. It has a very large breadth and depth of applications. For example, it address Property and Lease Management, Contract Management (IWMS/CAFM), Computerized Maintenance Management System (CMMS/MRO), Project Management, Asset and Inventory Management, Operation Management (Reservations, Employee Management, Financials). Axxerion script allows the apatation and customization of each of these applications to specific requirements of its users.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;As shown, Axxerion script is a language that is fairly strait forward to read and understand, but very powerful nonetheless. And everything in this paper is already possible; it all works today, in our production environment. This is not a plan for tomorrow; it is where we are now.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Axxerion has always been highly customizable, but with the addition of Axxerion Scripts our consultants are capable of customizing Axxerion to your specifications all the way to every detail of your business logic. Customizing an application has always been expensive in traditional applications. In an S-a-a-S application customization has been limited to the user interface. But Axxerion and Axxerion Script are different. They offer the same power of customization you can have in a traditional application but only at a fraction of the cost.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;What’s more, Axxerion Script can be programmed by our consultants, eliminating expensive and scarce programming resources. Also, because of its ease of development and updates, there is no need to define the requirements in every minute detail upfront. Our consultants understand your business and therefore they understand your requirements. Axxerion Script empowers our consultants to deliver the software you want.&lt;/div&gt;&lt;br /&gt;&lt;a href=http://www.axxerionusa.com/Blog/Blog/tabid/125/EntryId/8/Axxerion-Script-for-customizing-a-SaaS-application.aspx&gt;More ...&lt;/a&gt;&lt;div class="tags"&gt;Tags: Script SaaS,customizing IWMS/CAFM,customizing web-based applications&lt;/div&gt;</description>
      <author>info@axxerionusa.com</author>
      <guid isPermaLink="true">http://www.axxerionusa.com/Blog/Blog/tabid/125/EntryId/8/Axxerion-Script-for-customizing-a-SaaS-application.aspx</guid>
      <pubDate>Sat, 29 Jan 2011 07:52:00 GMT</pubDate>
      <trackback:ping>http://www.axxerionusa.comDesktopModules/BlogTrackback.aspx?id=8</trackback:ping>
      <blog:tag blog:url="http://www.axxerionusa.com/Blog/Blog/tabid/125/TagID/1/Default.aspx">Script SaaS</blog:tag>
      <blog:tag blog:url="http://www.axxerionusa.com/Blog/Blog/tabid/125/TagID/2/Default.aspx">customizing IWMS/CAFM</blog:tag>
      <blog:tag blog:url="http://www.axxerionusa.com/Blog/Blog/tabid/125/TagID/3/Default.aspx">customizing web-based applications</blog:tag>
    </item>
  </channel>
</rss>
