how to do design in XML instead of Html in nativescript with Angular? - angular2-nativescript

Is it possible to use XML instead of Html for design the screen in nativescript with angular app template?
Thank you for reading, looking forward to reading your responses!

The answer is yes: Angular is perfectly happy to accept XML for its templates in NativeScript -- we are doing that at my company Yollerhorn right now as we develop our mobile app, and we made the decision to help disambiguate our web templates from our native templates. The one caveat is that we've run into some strange errors around commenting and unrecognized XML, but in general it should work just fine.

Even though you're adding your user interface to HTML files in a NativeScript with Angular project, you're not writing HTML.
NativeScript markup is XML. Technically HTML is XML, but NativeScript won't understand it and a web browser won't understand NativeScript XML.
Hopefully that makes sense and answers your question.
Best,

Related

Orbeon FormBuilder Embedding

How do i embed Orbeon form builder in a non java webapp, (Plain Javascript) as well as customising its look (CSS). I am currently embedding it using an iframe but it doesn't seem to be a very good option. Any suggestions are appreciated.
Embedding Form Builder with the JavaScript embedding API isn't supported yet. At this point, you can only embed Form Builder with the Java embedding API.
There is no fondamental reason why this couldn't possible from the JavaScript API; it is just a question of issues that still need to be ironed out (for more on this, see issue #4483). So, as I write this, if you can't use the Java embedding API, you're correct and the only way to do this is to use an iframe.

How to build plugins style web platform with angular2

The idea is not new, like Wordpress, Oxwall : a platform created by some guru guy that allowing other dev guys to add new apps (like forum, blog, market-place, whatever) into the platform easily. By easy, we mean either just install new plugin by upload or less user friendly coding new plugin without changing the core code.
Actually, we have a working solution with angular1 but quite clumsy, that's it, multiple stand-alone ng-app within a website, like:
domain.com/forum-spa
domain.com/dating-app-spa
..etc..
Good thing about it is quite straightforward to implement, not much to worry about lazy-loading. But we are not happy with that approach for many reasons.
Angular2 is really close. We hope it can bring a better solution for building a large web platform
iframe
custom components that are added at build time that are added depending on user data like explained in Angular 2 dynamic tabs with user-click chosen components
This approach is compatible with the offline template compiler
There is also a more flexible way that supports user-provided component templates How to realize website with hundreds of pages in Angular2
This approach is not compatible with the offline template compiler and requires the Angular parser and compiler to be included in the build output.

What’s a good client-side fallback for HTML5 form field validation?

I've seen many different suggestions for fallbacks for browsers who don't fully implement html5 forms (solutions involving Modernizr, YepNope, Jquery validate...) but I haven't managed to get anything to work effectively.
Essentially apart from adding a datepicker which I've managed to get going with Modernizr and JQuery datepicker all I really need to do is get the validation to work in all browsers (main priority is the email validation)
Chrome and FF everything seems to work natively, yet surprisingly Safari validates without a proper email address. IE obviously doesn't support it either
Could anyone help with a reasonably straightforward fallback (probably via Modernizr)?
Thanks
Have you tried webshims lib? It's build on top of jQuery and I have implemented the forms chapter of HTML5 very accurately. You can find a list of supported attributes, properties and methods on the webforms site of webhims lib.
I would like to have some feedback on this.
cheers
Alex
Keeping in mind that proper validation should be done server-side, you can easily plug one of the many jQuery validation plugins.

Has anybody tried the new MVC HTML5 Toolkit from Codeplex?

I saw a tweet today referring to the MVCHTML5 helpers on Codeplex. I'm wondering if
Anybody has tried this out yet?
Does it add any real significant benefit over the default HTML helpers?
What are the actual HTML5 aspects of this library?
I would definitely recommend checking it (I am a little biased as I wrote it!).
But it's just a simple DLL that you include in your MVC project and it will give you all the benefits of HTML5 input types. If the browser doesn't support it - it will just fall back to a normal textbox.
To answer your questions though, it only adds a benefit if you are looking to add HTML5 functionality to your application or website. It uses the exact same syntax and the normal HTML helpers that ASP.net MVC comes with, but this just makes life easier if you are looking to add HTML5 functionality to your site.
Here is another link regarding HTML5 and the input types: http://diveintohtml5.ep.io/
I've just been trying it out, it doesn't seem to support the Required DataAnnotations for unobtrusive client side validation

Best practices for parsing HTML from Wikipedia for iPhone viewing?

I am building an iPhone Wikipeida game app, that requires modifying the default Wiki HTML a little bit (mostly simplifying the page).
So far I am directly downloading the HTML output from en.wikipedia.org/wiki/Article_Foo to a python Google App Engine, and then modify its CSS and HTML structure, cache it, and finally output to iPhone. It works but I find this method quite tedious, there must be a better method?
Please note that I use App Engine not just for parsing the Wiki, but the game also requires it to keep the stores...etc, hence not a overkill. Also, I would prefer doing all the work with python on App Engine, to keep the iPhone client as thin and mobile as possible (XML on iPhone is a big no fun)
Thanks a lot.
=======
Nick mentions why not use the mobile Wiki which already optimizes for iPhone. However, the issue is that it goes down quite frequently (every couple weeks or so), also its HTML structure changes quite frequently too.
You can use the MediaWiki API to download the markup text and use some API tools for Python that could make the process/modify work easier.
Caching and outputting to iPhone is fine. I believe there is not much to simplify here.
Why not just fetch the mobile version of the page from http://en.m.wikipedia.org/? This is already formatted for mobile devices.
You can set up your own copy of the server used by m.wikimedia.org:
http://github.com/hcatlin/wikimedia-mobile
It's written in Ruby, but this shouldn't be an issue if your app just uses the HTML output.