Xamarin.Forms + Custom Renderers vs. Xamarin.iOS/Xamarin.Android - xamarin.ios

I recently started using Xamarin.Forms for a project. Like the documentation mentions, it's great for prototyping. However, I'm really starting to notice limitations of the shared concepts for UI design. In particular, the inability to set custom button content (such as an image) is aggravating. I'm sure there will be several instances where I'll want to change how controls work.
The way I see it, there are two routes I could take. One, continue using Xamarin.Forms and make use of custom renderers. Considering I would still like my UI code to be shared, but also customized from the basic Xamarin.Forms controls, I'm leaning towards this option. Two, use the native Xamarin projects (Xamarin.iOS, Xamarin.Android). This would give me full control over the UI for each platform, but it would also mean more code to maintain.
Like I mentioned, I'm currently favoring the option to use custom renderers with Xamarin.Forms. Could I get some insight from those who have used one or (preferably) both options?

I've mainly used Xamarin.Forms. For the right kinds of apps (ones that are, well, "Forms"-like), it works pretty well.
Writing custom renderers isn't that hard, but the documentation is, unfortunately, not that great. Depending on what you're doing, it can be a bit tricky at times translating between the native control and the Forms layout engine. However once you get the hang of it, it makes sense, and now that the code is open source, you can peek inside to see how the "built-in" controls work.
There are various extensions that add more controls. Some are free and open source, like XLabs.Forms. So the control you need might be out there already.
You can use mechanisms like TapGestureRecognizer to turn an Image or a Label into a button, so just because the built-in Forms Button is really, really lacking in customizability, you can sometimes find other ways to get the same effect and still stay within pure Xamarin.Forms.
Hope that helps!

XamarinForms is good for sample application who don't need to use a lot of specificity of the device.
For complex applications, I advise you to start on Xamarin Ios and Android.
It will take more time to take charge but you will see it is much more permissive

Related

Xamarin.Forms or Xamarin.Android/Xamarin.IOS

I am new to Xamarin and not sure if chose Xamarin.Forms to create a application for ios and android platform has a problem or not.
The application has some features below:
The application will be able to running some code in background without launching application by user.
The application can be launched by a href link or a notification.
The application is able to launch a builtin Camera application, and receive picture data from Camera application.
Thanks,
Bo
The features you are mentioning can be done with both. Actually, anything you can do on Xamarin.iOS and Xamarin.Android can be done with Forms. Because Forms is only an abstraction layer for the UI which is installed by a NuGet package.
Now, having that said when to use Forms or when to use iOS/Android? It is mostly about UI. Are you going to do some advanced or platform specific stuff is is easier to implement that with the platform specific project.
If you UI will be the same in both platforms and mostly consists of some lists and input fields, then that is a very good candidate for a Forms project.
Notice how I said it is easier to do in the platform specific projects. Again here, you can do anything in Forms as well by the means of Custom Renderers, it is just a bit harder to do.
Ideally try it out yourself and see what suits you best.
In regard with your need to execute code in the background. This will be tricky and is very dependent on the platform that you're on. You will definitely have to write platform specific code for that for which you can use the DependencyService to abstract it to your shared code.
However like AlancLui mentioned executing code in the background isn't something that is easy to do on mobile. On iOS it is restricted to accessing location data or playing music, but still your app needs to be running (in the background). Android has something called Services for this, which makes it a bit easier.

Embeddable Web UI Designer

Is there are web framework that allows creating of custom Web UI designers that can be embedded into a webpage/webapp?
What I am looking for is to create a web UI that allows users to edit the UI in a drag and drop style editor. It should be possible to select some widgets (like these: http://scaffy.railsware.com/futurico/#pagination) and to select a data source (will be provided by back-end, nodejs).
Background: I am not a web designer and have no previous web experience. I just want to know if it possible to create what I am looking for and how much effort it would be. My background is in embedded Linux development and I would like to create an easy way for people to create machines with single board computers. The embedded stuff is pretty much complete and I am exploring ways to create nice and user editable user interfaces.
I think what you want is possible.
However... as far I know nothing exists which will do exactly what you require.
There are thousands of UI widgets on the Web to choose from but you would need a custom built backend cms developed especially for your needs
There plenty of Web agencies who could provide a bespoke solution. They could also assist with updates and adding new widgets.
So it can be done (and may encounter some browser incompatability issues), but you'll just have to be prepared to spend money.

A default and easy way to display a spinner while performing lengthy operations

I'm transferring huge chunks of data while my users work with their forms. Besides trying to optimize the code to ensure for the fastest connections, I'd like to display a spinning image in the middle of the form to notify the user that the software is sweating it's parts of to get the info as quickly as possible.
I'd like to point to following considerations.
Can I use an arbitrary animated image (e.g. abc.gif)?
Is it possible (suggested, even) to use the default spinner seen in the CRM?
Can such a solution be applicable even for older versions of CRM?
IS is possible (recommended, maybe) to use jQuery and it's cool effects?
Yes you can use any animated gif. Add as a web resource in CRM 2011.
You can take the default spinner and add as a web resource. I'd strongly recommend you don't try and address it directly.
Yes but the way you manage your scripts is less prescribed. No solutions or web resources to use in CRM4.
Absolutely. See below.
The jQuery plugin BlockUI is one of the most popular for potentially long running OData calls from which you need to prevent further UI interaction.
Since you'll need to attach directly to a DOM element it's use won't be supported. However, as long as you stick with attaching to the <body> element and avoid digging too far down into the DOM like for example onto the markup for specific form sections you'll be OK.
For CRM 2011 we use our own Web Resource to wrap BlockUI providing a very simple API enforcing consistent binding to the <body> element which also checks for the inclusion of jQuery and BlockUI scripts (Web Resources) on the form.
Same deal applies for CRM 4 but script management is much more down to how your team are currently managing customisations and dependencies.
The easier you can make it to use, the less likely other developers on the team are to go off and try and roll their own causing horrible inconsistencies in the final UX.

Best choice to build a website like http://www.pageflakes.com/

What is the best language and approach to build the widgets website like http://www.pageflakes.com/. By best I mean rapid development, performance, smoothness and by approach I mean that some one will use drag and drop plug in jQuery (some issues) etc.
Two functionality will be main in my site:
selecting the widget and then dragging on the specified position i like
saving the state without login for the user.
You don't mention your existing language skills which might be the most important detail here. Also, are you prepared to learn a new language/framework for this project?
Some generic advice assuming you would be using Java: since the site in consideration looks more like a web application as opposed to a "web site", a framework which supports rich controls/Ajax natively might work wonders here. A GWT based framework like SmartGWT might be an interesting candidate.

How to build an shipable, "local", branded mini-browser

Since I don't really have a good idea for word to search with myself I’d like to ask you:
Is there some project, technology, w/e that enables you to build a 'browser' with a very slim ui. Just some CI and a customised "starting page".
I'm thinking of something like the Webkit engine (and interface) Valve/Steam uses for it's clients store page.
In what direction should I search for something like that ? How would one start implement something like that ?
Answers to questions:
We need this to provide something like a "Kiosk" application (for touchscreens) and shippable to our Customers. Running a browser in "full screen" is a temporary solution.
As of Platforms: Windows is absolutely sufficient for now, but Mac/Linux wouldn't hurt.
Prism looks nice so far but lacks the "shippable" part, e.g. I see no way of packaging it.
Take a look at Mozilla Prism. It's a "UI-Less" version of the Mozilla/Gecko rendering engine aimed at deploying web apps on the Desktop. It's also multi-platform. It might be fairly close to what you need, with comparably little work.
WebKit has bindings for many languages, is cross-platform, and is full-featured as a HTML engine. A bit of work capturing signals and calling functions will make it into any kind of web browser you like.
You could use Adobe Air, follow this tutorial and include your website within an iframe. That would allow you to build an executable you can ship to your customer.
Various graphics toolkit libraries contain some components which can display a limited amount of HTML. I've seen this in qt (a C++ GUI library) and in Java Swing, and have indeed built a tiny "browser" in Java within a couple of hours. Java Swing lets you attach a link listener so links can be made clickable and thereby jump to different URLs. Thus, my application could be made to work as a very limited browser.
This approach lets you display text, images and links; in the case of Java, there's even fairly good support for CSS styling. However, there's no simple way to make buttons and form fields work, and of course no support for manipulating the DOM or anything else done in JavaScript.

Resources