Vheissu / aurelia-for-real-world-web-applications-book-feedback

Post feedback as issues here on Github for the Aurelia book. Be as descriptive and honest as you like.
15 stars 0 forks source link

Real world Authentication and Validation #122

Open elmt1 opened 7 years ago

elmt1 commented 7 years ago

Greetings Dwayne,

I have really pulled a lot of good information out of your book and it fills in some areas that the other two books I have read do not address. Overall, Aurelia is far easier and more intuitive than any other framework I have used and I am frequently surprised when I try something and it just works. Your section on interpolation and dirty-checking was the first that told me how using ${someProp} differs from binding and made the book worthwhile.

The main areas I am struggling with are how to integrate authentication and server-side validation into my application. Any real world application I have worked on required both but I have yet to find any good examples of either. I am working on an application that has a .net Web API back end and there are several areas that are pretty rough. Any information you could provide in the book on the following areas would be greatly appreciated:

Authentication: I took the easy route and just used the built in asp membership database with claims for validation. It is currently bolted on and doesn't fit as part of the application. Not sure if I should just ditch what I have but I haven't found a good alternative.

Server-side validation: I have some fairly complex validation occurring on the server. I can send that back pretty much any way needed for the aurelia-validation plugin but don't know how to integrate the two.

Validation: Attaching validation in typescript seems easy enough but I haven't been able to get the fluent API to work because it seems as though I am loading my typescript classes improperly. They don't actually instantiate directly from the fetch API. I probably have something simple wrong but can't find an example that works.

Other areas that I have had challenges with are how to force an array of objects to rebind when a object is added. I read that using array.push would trigger this but it sure didn't seem to work for me and I ended up forcing a save and page refresh to get around it. I also tried and failed to create a useful custom element and could sure use a better example of nested templates. I have a page that I know should be broken up (it is three levels deep) but I wasn't able to get either a custom element or nested template to work properly.

Thank you and keep up the good work!