The following sections highlight the noteworthy enhancements and new features included in this update.
New Localizable Business Project Template
The Crosslight 2 release previously introduced a powerful business template which includes tons of time-saving features designed for business scenarios such as remote data access management, integration with social network for login and authentication, user management, push notifications, and much more. In this latest release, the business template has received major upgrades which result to a brand-new template, accessible right from Crosslight Project Wizard.
Introducing localizable business template, you can now easily create multi-lingual business apps that work across multiple platforms, including iOS, Android and Windows. Specifically, this template leverages the new localization service which is also added in this release. The template provides the best practice and guidelines to implement localization in Crosslight apps. You will notice that all textual elements are now centralized in the Shared project under the Resources folder. From here, you can then easily add new resources to add support for more languages in your Crosslight apps.
For more information about this template, see Localizable Business Template.
50+ Item Templates for Visual Studio
You asked – so we delivered. This release now adds more than 50 project item templates that integrate to your favorite IDE – Visual Studio 2013. You can now quickly add most frequently added items to your Crosslight apps such as binding providers and view models. In addition, item templates for each platform are also included, such as the various view controllers for iOS, activity and fragments for Android, and pages for Windows. View template customization for iOS and Android is much easier now, thanks to the comprehensive view templates that include XIB file along with the designated class file.
To add a new Crosslight item to your project, simply bring the Add New Item dialog such as shown in the following screenshots.
To see the complete list of Crosslight item templates shipped in this release, see Using Crosslight Item Templates.
Dynamic Localization Service
New in this release, Crosslight localization service is the industry's first cross-platform solution for building multi-lingual mobile apps. Instead of defining the resources in each platform, the localization service lets you streamline the multi-language resources right in the Shared project – thanks to the solid Crosslight localization architecture that built upon observable design pattern. Best of all, the localization service supports dynamic language change at runtime. This feature allows your app to update the preferred language on-the-fly, without requiring app restart. With just an API call, Crosslight automatically synchronize all textual content currently shown in the view.
The following diagram shows the overview of Crosslight localization architecture.
In addition to standard controls, the localization service also supports localization for all platform-specific view elements, such as the navigation items in iOS, action bar menu in Android, and app bar in Windows. The following image shows the localization result of an iOS app.
For more information about Crosslight localization architecture and how to use the localization service, see Localizing Resources.
New View Template Definition for iOS
Creating custom header and footer template in iOS table view is now simpler and easier than ever. In the past, you have to deal with manual object registration in the view controller which require additional code. In this release, the table view introduces HeaderViewTemplate and FooterViewTemplate properties which you can simply override and return the desired template.
Here is the code example to define a header view template in a table view controller.
One of the noteworthy features built into the view template is the smart object and binding discovery. If the view template contains named objects and there are binding definitions for those named objects, the objects will be automatically bound to the data at runtime. As the result, a large number of repetitive code can be now eliminated.
The following illustration overviews how easy it is now to create a view template in iOS, from design to results.
The project item template for custom view is also available in this release, making it easy for you to add new custom views in Visual Studio. For more information about the new item templates, see Using Crosslight Item Templates.
To learn more about Crosslight architecture, MVVM design pattern, and data binding, see Understanding Crosslight Architecture and Fundamentals.
Major Stability Improvements
In addition to new features, this release is strongly focused on stability improvements across all platforms and components. Specifically, this release marks an important milestone for the Android platform which includes major infrastructure revamp and re-engineering to achieve best performance and consistency. It has been further stress-tested and passed rigorous user experience testing.
In general, Crosslight for Android has been specifically improved in the following areas:
Migrated Android framework to use Xamarin.Android.Support.v4 assembly (previously Mono.Android.Support.v4) which provides better compatibility with Google services and other third party components.
This update requires you to change the assembly reference of the Android project from Mono.Android.Support.v4 library to Xamarin.Android.Support.v4 library. No code changes is required.
Applying the new library on Mac:
Go to /Library/Application Support/Intersoft Solutions/Crosslight 2/common/Xamarin/Android and copy the Xamarin.Android.Support.v4 library to your desired directory. Change the Android project assembly reference to the new assembly.
Applying the new library on Windows:
Go to /Program Files/Intersoft Solutions/Crosslight 2/common/Xamarin/Android and copy the Xamarin.Android.Support.v4 library to your desired directory. Change the Android project assembly reference to the new assembly.
When using this library, take note that the first build might take some time as the library will download the necessary components first to the folder.
Also, check out the Xamarin Components page for regular updates on the Xamarin.Android.Support.v4 library.
- Revamped life cycle and infrastructure for activity and fragments to support better ViewModel state persistence during nested navigation, layout change, and other scenarios.
- Elegant rotation support, ensuring view state is properly restored without performance degradation. For instance, the list view should maintain its scroll position, and selection should be keep highlighted.
- Improved performance with more efficient resources allocation in various Android components such as the tab fragments, view pager, form activity, nested master detail fragment, and more.
- Improved stability and reliability to the core mobile services such as the camera services, location services, social services and more.
Support for Application-wide Single Sign-on
Crosslight 2 introduces many new services required to build business apps such as user services, social network services, authentication services and more. It originally includes support for single sign-on which works globally across multiple apps. Although this feature is ideal for more complex enterprise apps, the global-scope single sign-on may not be ideal for simple, standalone apps. In this release, the three essential services – data, authentication and social network – have been enhanced to support application-wide single sign-on. The business templates have been modified to use this new mode by default.
If you are using Crosslight's enterprise app framework, you can easily apply the app-wide single sign-on to your existing Crosslight apps by simply setting the SingleSignOnAppId property in the AppSettings such as shown below.
As seen in the above code snippet, the SingleSignOnAppId is set to PersonalExpenseApp. This means that the login session will be only valid to particular apps with the same identifier. This feature gives you the flexibility to determine whether you prefer to scope the single sign-on only to a particular app – or to a group of apps.
Alternatively, to see this feature in action, you can download the latest SyncSample which has been improved to leverage this new feature.
Improved Entity Container Performance
In this release, the EntityContainer also enjoys some of major performance boost, especially in attaching entities, adding entities, removing entities and other relationship management, supporting simple and advanced scenarios.
Improvements to Enterprise App Framework
Enterprise App Framework is introduced in Crosslight 2 to provide a set of design best practices and guidelines in building cross-platform enterprise apps. In this release, the framework has received significant improvements to cover even wider range of scenarios. It adds support for:
- Retrieving data through named query – CROS-341
- Refactored account API to support single-sign-on scenario with app-wide scope – CROS-342
- In addition, changes to the related entities can now be easily tracked during editing, see CROS-357
More improvements can be seen in the update list below.
Along with this release, all samples have been updated to reflect the changes and leverage the new features available in this release. Reported issues related to samples have also been fixed and committed to the master branch. Please download the latest samples from the master branch here. For more information about configuring samples in your development machine, see Configuring Samples.
API Documentation Updates
This service pack release includes over hundreds of new APIs for localization framework and many other enhancements across all view components. To help you discover and learn more about the new API, the Crosslight API documentation has been updated to reflect the API changes in this release. Visit Crosslight API Documentation.
About Crosslight 2
This update is building on Crosslight 2 release which includes 200+ new features that make enterprise cross-platform apps development a breeze. Take a look at all the new features in the Crosslight 2.0 Release Notes and see what you are missing out on!
Updates and fixes in this release
This release includes the following updates and bug fixes: