Creating Custom data type in umbraco 7.3 without using AngularJS - angularjs

I want to create a custom data type in Umbraco 7.3 without using AngularJS but I cannot do it because I don't have any knowledge about AngularJs.
I googled and saw that all of examples wrote by using AngularJs.
Is there any way to create a custom data type in Umbraco 7.3 without using Angular?
If not, please introduce some good sources to learning Angular that should be simple and practical.

No I don't believe it is possible since the interface is all in Angular but I could be wrong. Certainly the method that the team would prefer us to use is the Angular method. I have to be honest it was a little bit of a leap for me too creating my first editor but it's really not that difficult, trust me.
There is a good thread in the Umbraco form here: https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/46925-Custom-datatype-in-umbraco-701
And I would advise downloading the Umbraco source as the best examples are in the source itself.

If I remember correctly, you can generate custom property editors using just C# classes and class attributes. Or you can extend existing data types and tweak them. The only problem is you're limited to lists and displaying existing JSON feeds - most of which is best done using extensions like uComponents and NuPickers.
Have you viewed Nibble's blog? He's the primary source for most things data type related.
For your situation, the nuPickers dot net extensions sounds best. There's examples on this link.

Related

Building a Single Page Application with AngularJS and Sitecore (SPA)

I want to implement Sitecore application (single page design with angular js) :
Is that possible ?
If it is possible, what about experience editor, it will work with it ?
What about Sitecore personalization ?
I have no experience with angular js. what should I take in my consideration to achieve this
I will use Sitecore 8. i found this helpful blog about that but as he mentioned, page editor simply won't work
Thanks.
1.
Yes it is possible, I implemented a SPA in Sitecore 7 using AngularJS for the front-end and WebAPI to serve the data from Sitecore Items and it all worked really well together.
You could look into using Sitecore MVC Controllers which will work just as well as WebAPI. Or if you have time to learn a new Sitecore Technology you can look into using Sitecore's Entity Service. Either will work for serving data from Sitecore.
From experience I recommend you make controllers which are responsible for a single type of data consumed by the AnglarJS. The models passed by the controllers should be lean, containing only data relevant to the controllers purpose.
2.
For my implementation, the Experience Editor would not work as I used AngularJS to manipulate and present the data. It could be possible to use Sitecore Controls if you don't pull out the data using AngularJS but I don't think it'll be possible without hacking at it with code.
3.
Personalisation through the Experience Editor should be possible if you use Sitecore Controls. Personalisation through the Content Editor and code will be possible. I recommend you build your SPA as you would most Sitecore implementations; Layout, Sublayout etc. You can implement personalisation through code in the Controllers, Application Logic etc
4.
I had no experience with AngularJs either but I learned everything I needed to know from tutorials and the rest is logical enough for you to figure out if you're familiar with any programming language. I recommend you work through this Codecademy Tutorial that has you completing exercises - its how I learned.
I've yet to write a blog on how I achieved it but Dave Peterson has written two blogs on his experiences with SPA with Sitecore and AngularJs that might be worth a read.
Yes it is possible
Yes you can use the experience editor, BUT you have to build the site in a specific way. Not in the "normal" way.
Again, same as experience editor, you can use it, but the site has to be built to accommodate that.
Not sure on Angular - I have used backbone, but the principles are very similar.
I have a blog post on how we achieved this for a client: http://www.sitecorenutsbolts.net/2015/12/07/Single-Page-Applications-in-Sitecore-Part-I/
Have a read of that, it gives the principles you should follow to enable Sitecore in an SPA.
Anything is possible in Sitecore, but some customization are too complex to be considered practical.
You can easily build SPA application with the following limitations:
Display various views with either
a) server generated templates, or
b) static .html template with Sitecore-managed content (retrieved as json via custom controllers or Content API) and bound to template using AngularJS.
Limit the scope of personalization to just content.
Have experience or page editor view significantly different from the end-user experience. And even then, this will require separate design to create and maintain.
What is significantly more challenging is:
Utilize Personalization to dynamically display different renderings. Hide/show renderings, etc.
Have Experience Editor reflect the actual design of the SPA experience

Angular Schema Form vs Roll Your Own

I am trying to use angular schema form, http://schemaform.io/ While I find it great, I think it is too much like a platform solution and I am having to dig into the code to truly understand it in order to get it doing what I need with custom decorators. I am also finding the 'shema=' vs 'form=' to be very confusing.
I am now leaning towards the 'roll your own', Can anyone recommend using another package other than angular-schema-form or going the home grown route to maintain control? I have a hard time relying on 3rd party products when I don't fully understand them (or would code them differently) or if they will suite our needs.
So any options out there besides schema-form or any good starter packages for a home grown form generator using angularjs?
Angular Schema Form at its core is a template manager to reduce effort and manage re-use easily via config. You are more than capable to make your own Angular components and pass information to them via the UI Schema.
To elaborate on the differences JSON Schema is a standard for defining data models and the UI Schema (form) definition in ASF is specifically for the presentation layer, this also includes overrides of some data model properties.
There is no point in rolling a custom solution when knowing the internal workings of an open source offering provides you the ability to contribute and improve the library which is an even better result that everyone doing their own thing and re-inventing the wheel each time.

Rails 4 nested attributes with AngularJS

I have been searching online and have not been able to come across an example. Does anyone know of any resources for using nested attributes with AngularJS?
There's a lot of good information here and I've found it pleasant to work with. Their library does a lot of wiring for you, and I'm just starting to play with nesting the attributes but I did read on a blog that this library does it. I'll post more as I know it.
https://github.com/FineLinePrototyping/angularjs-rails-resource
Alright just did some quick reading on Nested Attributes in Rails here: http://api.rubyonrails.org/classes/ActiveRecord/NestedAttributes/ClassMethods.html
As far as I know there's no such equivalent provided with Angular. Generally speaking angular works with JSON encoded data coming back from requests like
{
"id":1,
"name":"Shaun"
}
and otherwise data is stored with Plain old javascript objects (or specific object types if a developer so chooses to create them).
There's lots of good info on various ways to use JavaScript on Crockford's site here http://www.crockford.com/javascript/javascript.html
But so far as I know you'll have to roll your own solution. I did a bit of googling on Nested Attributes and javascript and mostly the solutions/topic seem focused around Backbone.js but you might be able to adopt the same concept and just replace Backbone.js methods with their angular equivalents.
As it stands today angular doesn't really do a whole lot when it comes to your model outside of watching for property changes and updating things during a digest. My understanding is working on better functions for the models is a large part of what's in the works for version 2.0 whenever that hits.

How are you integrating help into your WPF application. Any recommendations?

The question says it all really. If you are writing a WPF application, how are you integrating the application help? What is the state of play in mid-2013?
It seems that there is no clear answer to this from an afternoon with a search engine, but several options:
Write your own fancy tooltip based help (but where are you getting your data from?)
Use .CHM files and the Windows Forms help system (seems archaic to me).
Use Microsoft Help Viewer 1.X or Microsoft Help 2.0.
There is some confusion as to which is more recent / approved of by MS. It appear Help Viewer 1.X might be the recommended option over Microsoft Help 2.0. It doesn't help that the names are so similar...
What is the status of 2.0? Should we use it? Was it ever fully deployed?
Use a third-party product to author your help files and link to them somehow - DocToHelp/NetHelp, NetAdvantage on-line help, etc...
Furthermore, what XAML based mark-up / attributes are you using to provide the necessary context? What is the recommended method?
It seems surprising there is no clear path for supporting application based help in WPF.
My current preference is to use a third party help authorizing system to generate HTML based help.
We then use a WebBrowser to display this help as needed. The authoring system we use makes it fairly easy to extract out a single page from the main help (each "topic" is a single HTML file, and can be included with full contents or not as desired).
Granted, this definitely felt like a bit of a nasty hack at first - but once we wrote the basic plumbing (some attached properties for xaml to specify attributes for context location and add behavior to trigger help, etc), it's fairly clean.
One very nice advantage to this approach, however, is a single help system build works perfectly in all contexts - we can include the documentation online, expose it locally for use in a browser, and use it with context from within our application directly.

implementing localization from database instead of properties file in springs

I am new to spring-mvc.
localization is working fine using properties file.But
I have translations in the database(Key,Value_en,value_native)how to implement localizations from database.I saw the answers implementing abstractmessagesource,didn't get that.I didn't get that how to switch languages and configure in dispatcher servlet.
Help me little bit clear about to get the idea.
A simple googlins took me to this article you should take a look at:
http://blog.javaforge.net/post/32188367580/database-driven-message-source-in-spring
The base idea is extending AbstractMessageSource with a couple of alternative classes: you choose which to use depending how your application grows (fixed languages vs fixed keys).

Resources