Wednesday, 20 August 2014

Aura extension to Visualforce

 Aura is a UI framework for developing dynamic web apps for mobile and desktop devices. Aura comes with a rich and extensible component set to kick start building apps. You don't have to spend your time optimizing your apps for different devices as the components take care of that for you.The framework intelligently utilizes your server, browser, devices, and network so you can focus on the logic and interactions of your apps.   


Some key features of aura include:

·         Tag-based layout & component definition
·         Encapsulated UI development with a strongly typed event model
·         Object-oriented programming behaviors (extends, implements, abstract)
·         Encapsulated bundles with models, controllers, CSS, static resources and markup
·         Integrated functional and performance testing (did you expect any less?)
·         Mobile, mobile and mobile-ready

Salesforce1 is indeed built on Aura It is also using the Salesforce Mobile SDK as well. This great collection of Dreamforce 2013 sessions featuring Salesforce1 also references the Aura session.   Aura really is, the journey SF have taken with it since Salesforce Touch  and a sneak peak at where it is going as native platform feature!. The source code is shared in GitHub, so you can even try it out and contribute!.Aura uses standard HTML5 features and thus infact runs in most modern browsers, you can modify your own browser url to see it, via /one/one.app (note that Salesforce don't support this, but it is a useful way to explore and test). As regards the container Salesforce1 uses thats driven by the Salesforce Mobile SDK, which itself hosts an instance of the mobile devices own HTML5 container. You can read more about via the Salesforce Mobile SDK link. 

 You can go through the Aura docs and they have an excellent tutorial that guides you through building an app. You can view the Salesforce1 source when viewing the one/one.app in your browser and see where they use some of the components, such as the abstractList component. It is a very interesting and powerful framework. Aura comes with a rich and extensible component set to kick start building apps. You don’t have to spend your time optimizing your apps for different devices as the components take care of that for you.The framework intelligently utilizes your server, browser, devices, and network so you can focus on the logic and interactions of your apps.

On top of that, Aura has a bunch of other benefits. Some other interesting things to note about Aura:
It is open source Aura lives on GitHub and can be forked/modified at any time. You can even contribute bug fixes or functionality changes!
Aura is not native to the Force.com platform Unlike languages like Apex and Visualforce, Aura does not require Salesforce. It was built for Salesforce, but it can be used by any developer. This will open Aura up to a much larger set of developers. In conjunction with it being open source, this framework will grow at a drastic rate Aura is built using object-oriented principles Aura provides the basic constructs of inheritance, polymorphism, and encapsulation from classic object-oriented programming and applies them to presentation layer development.
Aura heavily utilizes events to interact with different components
It is important to understand to the concept of event-driven programming If you have ever developed with JavaScript or Java Swing, you should be familiar with the idea of event-driven programming. You write handlers that respond to interface events as they occur. The events may or may not have been triggered by user interaction. In my opinion, Aura is the way of the future. It is going to be a fast, heavily tested mobile-first option. With the ability to quickly transition between desktop and mobile, Aura provides an incredibly powerful framework to create applications for all mediums. Take some time to start learning Aura now and get a head start!

Aura is built using object-oriented principles.

Aura provides the basic constructs of inheritance, polymorphism, and encapsulation from classic object-oriented programming and applies them to presentation layer development.

Friday, 1 August 2014

How to create a Flexi Page?

   Flexible page is used to display object listviews  inside salesforce1. The advantage is flexible page can behave as custom Home page for your app in SF1.  It is added to the Navigation menu.  Once you click on  flexi page menu you can see object list view. You can add publisher actions inside the flexi page to show inside the flexi home page and do whatever stuffs you can do with the help of a visualforce page.
                                               
Below is a sample flexi page from my Dev org



   
Do not expect too much from a flexi page it is only for list view and for accommodating publisher actions.  Creating a flexi page is little different but it is easy. Its all about uploading an xml file into your org.

How to create a Flexible page?

Creating a Flexible page is as simple as downloading a zip and upload it to SF :) . Just you want do some modifications.

Here you can download the zip file to upload into your org.

Steps to upload  flexi pages.

1.  Login to your org.
2.  Login to workbench
3.  In workbench go to Migration Main menu and then Deploy sub menu.
4.  Choose the zip file you downloaded from here.
5.  Select single package and click next.
6.  Now click Deploy. Wait for SF asynchronus operation to finish.



 Now the flexi page along with required objects, layouts, publisher actions uploaded to your org.

Now There are few steps before you view your flexi page in SF1

In your org go to

1. Create-->Tabs--> flexi tabs (Once you uploaded flexi page only flexi tab section will appear)
2. Create new flexi tab.



To View the flexi page in SF1 do the following setup.

1. Under settings--> Mobile administration --> Mobile Navaigation.

 Your flexi page will appear under available items section. Move this as it comes under "Smart search items" and then click save.

Now you are ready to see the flexi home page under SF1.


Test the Flexible Page in Salesforce1

Open SF1 from mobile app or    '/one/one.app' from your browser.  Now under APPS section you can see the flexi tab you created.  The page will show you a list view with Delivery objects fields. This list view is depend on your Delivery object standard list view  named "Today's deliveries". If you add a column, delete column change sort order it will reflect in SF1 flexi home page.

     You can access the publisher action by clicking on the  '+' icon  bottom left. For this example there is a publisher action called New delivery to create a delivery record.


                                 


  
For more details please comment here or visit

http://www.salesforce.com/us/developer/docs/salesforce1/salesforce1_guide.pdf