I have a SapUI5 application that contains several views in a single page.
I want to convert that application in to a component so that it can be added to another project. Is this possible, and does anyone have an idea how to do it?
I researched about components but I did not find anything that made it clear what I had to do. I am grateful for any answer.
Basically, as a best practice your ui5 app should have been implemented as a component based app from the beginning. Then reusing such a component based app should work easily. I think you should have a look at the official walkthrough tutorial where you will learn a little about components. Then you could google for some blogs about components, maybe my recent tutorial about components helps you as well. My tutorial tells you how to implement a component inside a library and reuse it then in apps (some new ui5 features related to components are discussed as well, i.e. usages).
And in case you only expected a simple answer to your question: test, it’s possible. See links above :-)
Related
I am four months incumbent to SAPUI5. I know the basics of SAPUI5 and am able to create application from scratch. However , this is true only for the controls that I am familiar with(I refer google/SAPUI5 SDK). Lately, I am realizing if it is brand new control for me, I have to spend a lot of time using SAPUI5 SDK going after the API reference, documentation and samples.
My question is could you please let me know how do I use SDK effectively ? For example, I need to know the method when a cell is clicked in sap.m.Table or an event for selection. How do I use documentation, API reference for it ?
Kindly help!
Whatever you are doing is correct, API reference has everything you need.
I can tell you the tricks I did while working on SAPUI5:
Every time you visit a reference about a particular control, watch out from where it has been inherited. This gives an edge, most control will have basic handlers at the parent control which can be reused in child controls. Example sap.ui.core.Element, this is like Grandfather of many controls. Spend time to understand this kind of controls.
Use browser console as your playground, create a particular object you are playing with, then use .and see what are the methods which are exposed.
Aggregations tell you about what is the kind of content a control can take in.
There is no other magic to this. Trust me, over a period of time, you will be very much faster in figuring out what fits.
~Cheers
When I work with new controls it helped me to take a look at the control samples first and its coding. This gives me a good quick overview.
Then I take a closer look at the API to that control to find out more about the properties, aggregations and events.
Sometimes I build a quick and simple example app for a certain control. This helps me to find out how the control is supposed to work.
As already mentioned, there is no way that works for everyone and it'll take some time.
You'll find your best way of working with it.
Hello UI5 enthusiasts,
I was wondering if it is possible to extract the OpenUI5 view layer in a way similar to Twitters Bootstrap.
The reason is that I work at an SAP partner that creates software outside of the SAP stack. We would like to add the UI5 look and feel to our own web applications though, which are build on Angular and Twitter Bootstrap.
The goal would be to let our customers become attuned to the Fiori look and feel and increase the familiarity of our SAP products. Which could eventually lead to more sales on that side.
But for that we would prefer a light-weight solution. I'm not aware of using the openui5 stack like that, because it needs to load the core and manages the application in its own way.
For that it would be great to have the view components isolated to use them on their own.
Is it possible to do that or would it be an option for the UI5 product team to create a Bootstrap like solution as described above?
Kind regards,
Michael
from OpenUI5 side, we have some concerns around this approach as there is quite some overlap between Angular and UI5, especially with regards to data binding and MVC. When using the UI5 controls outside the UI5 context, you cannot leverage the main assets that the UI5 data binding adds (some of them are described here https://openui5.hana.ondemand.com/#docs/guide/91f0ca956f4d1014b6dd926db0e91070.html and others like error handling will come soon with 1.28). Still, I'm not saying the combination of UI5 controls with Angular is not possible at all, maybe someone is trying as it is open source but there is an investment needed to close gaps that OpenUI5 already has solved in an excellent manner. On the other hand, it is quite easy to use bootstrap inside UI5 (not Angular). Might that be an option?
What you can examine as well is http://ui5strap.com/. I personally did not yet find the time to assess the approach but it might be worth for you to have a look.
Best regards
Stefan
Is it possible to create databinding between a business object and the elements in the View Controller? I have reviewed the documentation on the Elements API but I'm not seeing any references to binding. We have chosen not to use the Reflection API for this application so that's not an option.
I am very new to working with Monotouch and iOS in general, so please forgive me if this question seems like I haven't done much research. Any suggestions or links to documentation are greatly appreciated.
You can use monotouch dialog in reflection mode to show and collect data using attributes on the data members.
Beyond that, there are a couple of projects which have taken dialog further towards mvvm - search for monotouch.mvvm and mvvmcross - but you may find these overkill for your first monotouch/ios project.
https://github.com/RobertKozak/MonoMobile.Views
https://github.com/slodge/MvvmCross
just starting to learn Dojo, and I am having a heck of a time finding some good examples to look at or even a good IDE installation guide (currently using a plugin of Aptana in Eclipse).
I'd love to look an app (with some instruction on how to set it up) that demonstrates some of Dojo Standards of developing a Large Scale Dojo Application (utilizing Modules, OOP, etc.)
Its hard for me to get started without examples / understanding some of dojo's higher level concepts.
Edit**
Found this link from javaworld... I though it was a good start... if anyone has any other tutorials like this (esp for incorporating AJAX / JSON into Dojo) I'd appreciate it.
There exists a lot of Tutorials and documentation on the main page:
Tutorials
Reference Guide
API Documentation
I think the best way is to pick the Tutorials and just work through them. I would start with the basic, finding some DOM elements, AJAX, animation and so on. If you knew the basics work through the tutorials that explains how you can create your own Widgets.
To order it a little bit. Read the other tutorials not linked here before to get warm with Dojo.
Learn OOP in Dojo
Understand the Base Class every widget inherit from
Create your own Widget
GUI Design with Dijit Layout
How to build a large application
Deploy your application
Another good help is to use the maillinglist. There also exists a webgui to the mailinglist with the possibility to send messages from there.
http://dojotoolkit.org/community/
If you need professional Support look at http://www.sitepen.com/
Any good sample WP7 application using MVVM model in the optimal way?
I'm creating my first WP7 app, and I'm using MVVM as far as I can tell, but I'm not sure I'm doing it the right way. I have one view model per page, instead of one main view model that branches to each page, I'm not sure which is the correct way to do, so I'm hoping there's a sample app out there that I can check out.
Thanks!
Edit: I'm also having another problem on saving the ViewModels in the application state, because I think they have to be serializable (haven't worked much into this), the thing is that when I start a task and come back to the app, the latter has already been deactivated by calling the former, so I have to serialize its state when deactivated and [re]serialize it when [re]activated. This is how I save the state when deactivated:
object[] viewModels = new object[3];
viewModels[0] = App.ViewModelPage1;
viewModels[1] = App.ViewModelPage2;
viewModels[2] = App.ViewModePage3;
PhoneApplicationService.Current.State.Add("LastState", viewModels);
Again, this is probably not efficient way to do it, so I'm hoping I can see a sample app that handles this well too.
Thanks!
Have you looked at using the MVVM Light toolkit?
Serialization best practices will vary based on the volume of data in the model, the number of models being used and whether it's necessary to always load all of the models.
You might want to check out Caliburn Micro. It is used to implement a number of user experience patterns but it supports WP7 and has sample code.
Here's some MVVM samples and guidance you can check out.
C#er : IMage: Model-View-ViewModel (MVVM) Explained
.NET by Example: Using MVVM Light to drive a Windows Phone 7 / Silverlight 4 map viewer
The simplest way to do design-time ViewModels with MVVM and Blend.
Also an overview here of MVVM frameworks you may find worth a look.
JAPF » Blog Archive » Discover and compare existing MVVM frameworks
Light weight seems to be good and MVVM Light is popular. Laurent demos MVVM in the Mix 10 video EX14 if you want to check that out too.
This months MSDN magazine has an article on creating a WP7 Sudoko app using MVVM.
http://msdn.microsoft.com/en-us/magazine/gg490347.aspx
HTH
Here is my article which describes the approach to build WP7 applications using advantages of separation of concerns:
a framework for building of WP7 application