Can I share common code between JavaFX and oracle MAF? - mobile

I wonder if it would be possible using a MVC strategy, encode parts of Model and Control in Java and have two possibilities to code View, one in JavaFX and the other in Oracle MAF.
I would use JavaFX to develop the desktop version and MAF for the mobile version. I know I could use a port for mobile with JavaFXPorts but considering that RoboVM was discontinued I would not want to bet on this strategy.
I own experience in Java but not used JavaFX or MAF, I doubt if I can do what I want because I found nothing on the internet talking about using the two technologies together to design a multi platform mobile / desktop.
The biggest question is:
Is it possible to completely decouple the view from the control and model or JavaFX and/or MAF, in some circumstance, use a strategy of Control/Vie "tied"?

From an Oracle Mobile Application Framework (MAF) perspective, as an Oracle product manager for our mobile portfolio I'll make the comment we've not tested JavaFX integration with MAF at all, and as they are completely different UI technologies and have different lifecycles, I doubt this would work at all. Or it would be an uphill battle all the way & you'd waste a lot of time & hair. As such I recommend you don't pursue this option.

Related

Do I have to duplicate views in an ExtJS Universal app for modern and classic toolkit?

I am not new with ExtJS, building apps since ExtJS3, but I am definitely new with ExtJS universal apps.
What I undertand is that, in an universal app, we have to define both classic and modern views separately, in classic and modern subfolders. Doing so, both views can share the same Models, Stores, ...
Does it mean that classic and modern views are completely separated? Is there a way to use a classic view in "modern" mode, I mean when loading application on a phone?
Or should I have to completely duplicate my views, if I want to have the exact same functionnality using the application on a desktop and on a phone?
I already read the Sencha docs, but that part is not really clear for me...
Thanks in advance !
LuD_GRi
When starting a new project, which toolkit should I use?
Question details: We’re currently starting development of a completely new app – initially for desktop, but later we’ll add support for phones. What’s the recommended way of building this type of app that is the most future proof? Should we go for a universal app and create our initial desktop app with the Classic toolkit, or is a Modern toolkit only app the best approach from now on?
We recommend the Modern toolkit for most new projects, but there are several features in the Classic toolkit that would also make it the right choice. The following features are only available in Classic: locking grids, support for IE8 / 9 / 10, and accessibility and support for RTL (Right-to-left) languages. If your application needs these capabilities, then Classic is the way to go.
link
I think you can mix both of these approaches in one case - if supporting older browser versions such as IE8\7\6 is not important to you. Honestly, I have not tried to mix them. and not sure if this will work. I think this is unjustified
Modern toolkit is created not only for mobile devices. This is generally a toolkit aimed at fresh versions of browsers, and free from unnecessary tricks to support things specific to each version.
EDIT:
link2
By design, the classic and modern toolkits target different generations of browsers. If you write an application with both classic and modern user interfaces, the user sees one or the other, depending on the runtime environment. You cannot mix and match view components. But both toolkits do share core features, such as the class system, the data package, the view-controller-viewmodel architecture, etc.

JavaFX2 and Oracle's plans about mobile operating systems

I'm writting diploma work about JavaFX 2.0, and I need some information about further growth of this technology. I thought it will be super-multi-platform, but after googling I little disappointed: there are a lot of problems with iOS and android, also in the roadmap of JavaFX there are information only about desktop OSs... So, can developers expect some progress of technology in mobile direction? Will JavaFX be desktop-oriented or wide-universal technology? Or, maybe, it will be some special branch "Mobile JavaFX2"? If JavaFX don't support mobile phones development, Oracle will haven't modern and competitive technology for this huge area of developing?... I really need some answers! Thanks!)
If you asked the same question three years ago i would say that javafx has a bright future. Same thing for Silverlight and Adobe Air or flex.
Today i would say just a single word... HTML5
Java will always try to find a seat on the client side... Adobe sucks because they abandoned their flex developers few months ago and who says that it will not happen again with Air?... Microsoft still tries to convince us that silverlight is a good tech while on the other side they promote ASP.NET with ajax capabilities as their main weapon.
See how fast the browsers are struggling to comply with HTML5 (future!!!) standards and you will agree with me that the above technologies were born obsolete.
there are a lot of problems with iOS and android
There are no problems but one - iOS and Android are not supported in the current (JavaFX 2.1) version.
can developers expect some progress of technology in mobile direction?
Not until it is in the public roadmap (which it is not today).
Answering your other questions would just be speculation on the part of anybody who does not know Oracle's private plans. If you are interested in speculation, you can find some here.
This is probably not a direct answer to your question, but i hope it might point you in an alternative direction
Adobe air is architectually very simalar to java. It also runs on a vm on multiple platforms such as windows, osx, and ... Android and IOS. And it's gui's are sexy ... Real eye candy. For mobile there are some considerations, but currently it is the best cross platform language for gui building in my opinion. Not for server side though. But it integrates like a dream with a java server by means of blazeDS or LCDS.
I know that apple has restrictions as set out by their terms and conditions that you are not allowed to run your app in a virtual machine. So adobe had to compile the entire air app as a native application that basically includes the entire air framework. My guess is that oracle is facing similar issues, and that is probably why it is taking some time to roll out
Having fxml with the power of the java language, definately something worth while waiting for and looking forward to it.
HTML 5 has no future.. this tool has lot of problems of it's own..HTML 5 can't be used to develop enterprise applications, it is very difficult to code,debug and maintain which is very important for any long term projects on other hand JAVAFX 2 is on the rite track of creating GUI with use of object oriented concepts which makes java developers to easily code,debug and maintain without any hustle..

WPF or ASP.NET MVC for UI for an expert business application?

I know this question was asked before, but almost 2 years have passed and the business requirements are a little different.
We are in the beginning of developing a mid-sized application and are divided which technology to use for the front end, WPF or ASP.Net MVC 3?
We are not an IT-company, but a business company with an IT-department who can outsource programming tasks, while the business core shall remain within the company. I did spend a lot time searching the internet for the answer, and I partially did succeed, but since the question is so important, I thought I ask here as well.
Of course, before someone can answer the question I need to specify the requirements and environment for the application at stake:
Infrastructure:
We have a pure Windows environment. Each user will have either Windows XP SP3 (currently) or a future version of Windows (if we skip from XP to Windows 8 remains to be seen, but let us assume that the user will use Windows 7 next) installed.
We are aiming for a service oriented architecture, meaning we only want to run/show on the client machine what is really needed. This is especially important since the databases are far away from the clients (USA/Europe). We plan on using WCF for cross machine communication between user system (brower or WPF), application and database server.
We expect the main user group to be around 30+, but since we are a growing company there should be no issue scaling up to 100 users. The users are spread over three main locations over the world, while we want the option to support smaller locations as well. All those locations are connected to the same intranet.
UI Experience
The new system is supposed to replace existing systems which are desktop applications (Winform). The number of screens are likely to be around 100+ with many labels, comboboxes, graphs. I like to call it an expert system b/c we expect the user to spend multiple hours a day with it, the user is expected to do interact fast with it (many clicks, multiple dialogs pop-up and close etc.) and the application will contain a lot of business logic (mostly mathematically).
Some limited interaction with Excel is required. At this stage only importing formatted data out of .xlsx file into the application in order to work with the data. This we expect to happen often.
Copy&Paste from Excel or other applications into our new application is a requirement (no pictures, just text).
We will use a vendor control library for a richer UI experience.
The users are used to desktop applications for their daily work (current systems/Excel etc.).
Tablet or smartphone support is not a requirement.
Deployment
If we were to use a WPF application we would likely either deploy it in CITRIX or use Click-Once.
Here are arguments of the two opposing factions:
Pro Web:
Deployment is much easier. All the requirements can be done in a web application directly, and if not we use ActiveX or make a separate desktop application for the missing parts. Also, the IT world is going to stop doing pure desktop applications and everything is moving to HTML 5 (Windows 8).
Pro WPF:
Web applications use many different technologies which makes it more difficult and costly to develop and maintain (HTML, ASP.NET, CSS, JavaScript, JQuery, AJAX). There are major deficiencies in a web-applications, mainly
Considering the various browsers and versions.
Screen resolutions
No hardware support for graphics (business graphs, point graphs with 200+ points)
Restricted access to local hardware (importing files, creating files, printing)
Keyboard shortcuts
Point #1 is also worrying since the browser is more out of control since other web-applications in the company (not expert systems) are used, and we fear conflicting interests with the new application (e.g., we must use a browser version where ALL applications run/render fine).
I know there is no black and white on this, but I would be interesting in the following:
Who was in a similar situation and how did they solve it?
(there is a nice article at http://karlshifflett.wordpress.com/2007/12/20/reasons-for-choosing-wpf-over-aspnet-for-very-large-project/, but the problem is that the article is 5 years old :(
How much more expensive is a web solution?
For development assume that the programmers are equally skilled in both (we can outsource this). For maintainance assume that we will internally support this where we have limited knowledge in ASP.NET and WPF. We know WinForm/WCF using C#. We would have to train/learn either technology.
How easy can a web application do Excel interaction, printing etc.?
I read a lot about "ActiveX hell" and I am wondering where we stand today?
Deployment
I have used Click-Once quite successfully in the past, although some team members mention that Click-once can be an issue. Any experiences?
Future?
The system is supposed to last 5+ years. We can not target HTML5 at this time (WinXP only up to IE 8). Where does Windows 8 stand on this?
Other thoughts?
What important things am I missing?
Thank you!
I know this entry is long and not an easy question. So I think you for reading and thank you even more for constructive feedback. Thank you!!!!
I would not build a business application in WPF, especially if your goal is to have it last for 5+ years. Silverlight is in sunset phase now - Win8 apps are betting on JavaScript and HTML5 now, though you are correctly noting that HTML5 support is not universal across all browsers and platforms (see http://caniuse.com/)
Let me try and address some of your concerns above to hopefully persuade you to build a web app:
Considering the various browsers and versions. Yes, you would have to do that. However, for enterprise applications most of the time you can find an acceptable solution if you use industry-standard web technologies and don't use esoteric HTML5 stuff that is not universally supported. It won't be a slam dunk, but it is very much doable.
Screen resolutions. You can address this by utilizing what is commonly known as Responsive Web Design. Once again, there is broad community and industry support for CSS frameworks that allow you to achieve responsiveness. YUI and Bootstrap come to mind as two examples.
No hardware support for graphics (business graphs, point graphs with 200+ points). Well, here is where HTML5 Hardware Acceleration may help you, but I'd say that libraries like HighCharts can easily handle 200+ points graphs - see this example
Restricted access to local hardware (importing files, creating files, printing). Fair point. I'd argue that working with files is MUCH easier with things like Socket.io, Filepicker.io and Zip.js, but "enterprise" requirements may get in the way. And as for printing, you can create "printable" version of your pages or generate PDFs and Excel Exports on the server side. Not ideal, but very much workable.
Keyboard shortcuts. Have you used Gmail app? It is full of shortcuts and keyboard-based interactions. This applies to any application - if you need keyboard interactions, you'd have to build them regardless of your choice of WPF or Web

While porting a windows application to web, is it better to stick to conventional web technologies or adoping RIA is wise?

The web based application I am working on currently is a port from a windows application. This application is very data intensive. There are scores of modules and each of these modules have number of forms (data entry screens) and reports whereas the forms have many many fields and likewise the reports.
I have been trying to identify the most suitable architecture for the presentation tier. There are many functions that are not very easily portable, for example printing (this too is very complex). For most of the others, I am planning to us "Ext JS" library which looks like capable of handling about 70% of complexity out of the box while for the remaining I would be custom coding or extending Ext JS.
Having said that (sorry for being so descriptive), I wonder, if this is an Intranet application, why not port the entire application to SilverLight? While I am good at .Net, I'm somewhat alien to SilverLight. Considering I know my target audience and that the software will be used per seat license, would it be better to ride on SilverLight or is it better to stick to conventional web (XHTML, JS, CSS, etc)? Further, I have to support multiple devices in future and considering that SilverLight plug-ins for many devices are yet not out, would it be a risk?
IMO, if you are developing a web application, then yes, develop it as an RIA.
The choice of technology is up to you. I prefer jQuery and have never used ExtJS. But I've taken a look at it, and if your aplication is a port of a windows application and has a lot of conventional UI elements like forms, input boxes, toolbars, menus, button etc, then go for ExtJS.
As for some controls that are not available in ExtJS, you can easily extend ExtJS.
Regarding .NET: ExtJS is completely server-technology agnostic, so you can develop your application in .NET and still use an ExtJS UI. In fact, I would prefer to do such an implementation.
Regarding Silverlight: I am slightly against using silverlight, primarily because it requires a plugin to be installed that is not available on all platforms. But since your application is an intranet application, your user base will be in your control. But you should make sure that any future decision regarding the workstation platform will not affect your application's working.
Cheers
Whether to use Silverlight over HTML/JS etc. in this case would depend on 2 key factors.
What are you familar with already
What type and range of devices you need to reach.
If you are already comfortable with HTML + ExtJS then that has to be huge pro in its favor.
The range of devices that Silverlight is possibly going to be available (Windows Phone 7 for example as well as Moonlight, I've even heard that there may be port for Andriod and Symbian) is growing. However its really early days for that and not all may materialise in a form useful to you.
Having said that it should be acknowledged that a UI designed for use on desktop does not work well on a small device. Hence you would need to develop some task specific UI for other devices regardless of the technology you use. This in turn means that there is no reason for you to try to stick with single technology for all devices.
I think you should look very carefully into WCF, REST and OData first. Good layering of the application into useful models using these would more easily enable the use of a variety of front-end technologies for the client.
If you are into .NET and other Microsoft tech then you should seriously consider using JQuery and ASP.NET MVC as another potential front end technology.
I think that you need to ponder the inconveniences of a solution based solely in Silverlight. Like Flash it needs a plugin to be installed in every station, so it loses some of the premises of web applications (run everywhere with the only requirement of a browser). Besides although Silverlight has taken great advances, it is not yet a widely supported standard, and it is in control of a company who later may decide for you in very important matters regarding the platform you use, and made it outdated or useless (in the worst case).
Ext JS is a great library developed entirely in Javascript, so you can touch anything that suits your needs. If the Windows applications you are basing on is well-layered, then your work may not be that hard.
If you are an asp.net developer you could take a look on asp.net mvc, a great set of tools that implements MVC pattern to web applications using the same old C# or VB. Besides the developers behind asp.net mvc, have taken a lot of work to make it suitable to work with javascript libraries like jQuery
Happy coding!!!

Which platform is used in companies now-a-days to implement mobile applications?

Basically i would like to know which platform is currently used to develop mobile applications i.e. J2ME etc etc...
Also any new ideas on mobile applications would be quite helpful.
Generally, the approach is to go for a website, if possible, and adapt it to each phone using a 'device detection layer'. We use DeviceAtlas.
If you want to write native applications for each phone, then you need to do it in each of the native languages (and there are a lot).
Symbian/Java: Greatest 'penetration'
iPhone/iPod Touch: Latest trend, objective-c for this.
Android: I think this is a variant of Java, and will be a very marginal component of the market for a long time, though maybe high among a certain type of techies.
Basically, you are going to need to profile your market, and determine the best approach. But as I said, in general, you'd prefer a website, and mostly, a website is all you need.
There is a framework called Rhodes by Rhomobile that allows development of native applications for all major smartphones. See my answer to a similar question earlier this year.
We are primarily targeting the iPhone, but don't always make an iPhone-specific application. The web browser on the iPhone is good enough that a lot of our web apps just run there ok. So many of the apps we're writing continue to be done using the same platforms we've always used. We're a big institution so this runs the gamut from J2EE and .NET to Php and Ruby.
Mobile-only apps are developed in XCode (or web versions in DashCode).
If you need to cover multiple mobile (esp. smartphone) platforms, Javascript (with HTML and CSS) may be the only way to go, despite all its limitations. You get under the radar of Apple's iPhone app vetting, it's the only way to target Pre, you can also cover Blackberry, Android, Windows Mobile, AND Nokia on a single codebase... unless the limitations are just TOO stifling for your specific purposes, it sure seems like the way to go!

Resources