Can I use Angularjs for my site redesign? - angularjs

I have a website in which we have used asp.net, c# and SQL database. In this website we are frequently retrieving/submitting the details from database. Now we are redesigning this website. How about using Angularjs while redesigning? Will it make the development easier?
Or please let me know if we have better framework for this.

If you are using basic asp.net, then not really.
You have a page which includes a .cs "code behind" file and a ".aspx" file that are coupled and work together.
Why would you suddenly need a client side model? This is more relevant for "Asp.net MVC".
Now you could do some work arounds and start working "ajax + json oriented" to insert angularjs, but you will need a lot of changes.
Now, if you are planning on a large redesign, I would try looking at web api(you dont have to change your whole site, but maybe you will prefer to create a service that will work with your database to fetch data and return your angular js client json's that will data-bind with your views).
Now if you didn't understand me, I'd google "Asp.net web api" up and then google some "Asp.net web api and angularjs" up.

Yes, AngularJS can be used to simplify the front-end side of your website development.
Their developer overview provides a great brief on how to do data binding: https://docs.angularjs.org/guide/databinding

Related

Develop backend (Spring) without frontend (angular)?

I am programming a spring-boot project. I only want to create the backend. Another developer will later on create the frontend with AngularJS.
I want to develope my backend without spending to much effort to create a test-frontend, since I dont know anything about JSP,Angular..
What should my Controllers(#Requestmapprings) return (Model, ModelAndView,JSON-Objects, Strings, ...??), so the angular-developer can use them for creating the view?
Is there any easy way to develop my backend without creating a frontend at all and still being able to test it somehow? I dont want to spend time to create basic Forms/Buttons/checkboxex but i would like to check if my scripts are working..
You must start looking into REST services.
https://spring.io/guides/gs/rest-service/
To see how it is consumed by angular please refer.
https://spring.io/guides/gs/rest-service/
You can get lots of tutorials and documentation on developing REST services independent of frontend.
I would suggest taking micro services approach based on the UI requirement and then segregate the services based on the functionality. This would make the code maintainability and development easier. If you are going to use spring-framework, it has vast stack of features, which are production ready.

Mobile app with codeigniter

I am a first year "computer programmer" college student and I got an internship where I was asked to develop a simple cross platform mobile app. Nothing too complex, consists in a login screen, then a screen with a form where I'm using jQuery UI autocomplete to get some info from the DB, a select box, datepicker and a text area. The other screen is just a table with information with the current day, week and month records of whoever is logged in.
I am using HTML5 and CSS for the front-end and php with Codeigniter to connect to mySQL DB.
The question is: I intend to use phonegap to turn it into a hybrid mobile app. Would you consider this a good approach? Or would it be worth it to delay the project a little more and learn how to do it using Ionic framework for the front-end and learn how to use node.js to connect with the database? Also I could use Ionic for front-end so it feels more like a native app and still use Codeigniter to connect to my server. I'd love to read your opinions and suggestions on this.
Thanks in advance.
I would highly recommend using Ionic for the app, you get a lot of stuff right out of the box that you will otherwise have to figure out your self.
Getting started with ionic is as easy as writing 'ionic start' and choosing a name for your project and a template to start from.
Depending on you level of web development skills you could really quickly end up with a app of spaghetti code without some kind of framework to set up some guidelines on how to structure your project.
As for the backend I will recommend you to use what ever you feel the most comfortable with as long as it easily can expose the REST endpoints you need.
Lucas Berte Schoenardie,
Since jquery mobile is not updated last two years so it will be better to choice IONIC which is using AngularJS (Google product) and App with Ionic is more native than PhoneGap( using jquery).
This reference on StockOverFlow may help you to take appropriate decision.
Thank you!

Grails - Ionic - AngularJS - Is it a good idea to work in this Env.?

I want to create an application using Ionic and AngularJS and Grails?
Also, I want to use Grails Spring Security Core plugin for login or registrations procedure.
Although, Stack Overflow is not the correct site to ask this type of questions which simply needs suggestions and other's opinions.
Well, we are here to help. You can try other StackExchange sites like https://softwareengineering.stackexchange.com/.
Grails + Ionic + AngularJS is a perfect combination of frameworks to build a fully functional and elegant mobile application for all platform. We've build various mobile applications using these three technologies and they work awesome.
Since Grails fully support the concept of rest API for JSON and AJAX based calls, it is absolutely possible to use it along with AngularJS. AngularJS doesn't care about the server-side technology you are using as long as your server side code can communicate over JSON data.
Ionic is just a beautiful front-end SDK which works on the top of AngularJS and provides various utilities to develop a hybrid user-friendly mobile APP.
So you can easily use these 3 technologies and get your mobile app ready in a few weeks.
Ionic doesn't care about what you use as a server stack. As long as you create a service which has well defined interfaces (REST?), you should be fine.
I for example use PHP (yeah, I know, shocking, right?) Slim framework + Postgres database as my backend.

I need to implement Asp.net Web API 2 and consume it by Sencha Ext JS

I want to implement a web-based API (using ASP.NET Web API 2) and consume it by the client Side library (Sencha Ext JS).
My application should include
A simple user registration form.
A login page for admin.
CRUD operations for users' submissions.
Notes:
I do not want to include any backend code (i.e C#) in the we application, I want to implement it using the HTML/Javascript only, that is Ext JS.
I want the Web API to be RESTful.
I want to protect admin pages.
I want to use the SQL Server to store users' submissions.
All of that requirements should be implemented using the ASP.net Web API 2 and Ext JS only.
So far, I did initial search and I got a lot of learning for either the ASP.net API 2 or the Ext JS. But I couldn't have a guide that help me to fulfill the above requirements or help me to have both technologies work together.
Pleas help me on either way.
Or generally, can you help me get started work in combining both: Asp.net Web API 2 and any client side that consumes it, such as Sencha Ext JS or any other client side. It is not necessarily to be Ext JS.
Thank you so much.
Thanks to StackOverflow.com
If it were me, I'd use the DirectAPI for asp.net https://github.com/elishnevsky/ext-direct-mvc
You create webapi controllers, just like you normally would. The only difference is the the controllers that need to be used by EXT should inherit from DirectController.
If you follow the directions on that page, you'll end up with a globally available proxy object that matches the name of the controller and the public methods hanging off of the controller become methods of that object.
That is, server side controller MyAwesomeController with method DoSomething() becomes MyAwesome.DoSomething.
If you attribute the method as [NamedArguements] you can create methods such as
DoSomething(int id, int foo)
and pass from javascript as DoSomething({id: 20, foo: 30});
Since it is still just a controller, you can attribute permissions and return json as you would in any other situation.
If you get stuck, use the debugger and spend the time to figure out what's really going on. This all works in 4.x and I've tried it in 5.x and it still works there as well. But I wouldn't jump into 5.x just yet as there are still several bugs that need to be worked out by the sencha team before it is ready for prime time.
ExtJs has a REST proxy for the data. So what you try to do should be possible. The proxy can be configured and be finetuned.
I used the JSON proxy. ExtJs has very powerful filter and sort capabilities, both server and client side. In my experience difficulties arose when filtering and sorting server side. There is only sparse documentation on how the parameters are passed and which configurations have what effects.
Since you also develop the REST api, you can adapt to those details. You just have to do some research.
Here is not the place to ask about guides. For Asp I cannot help you, I never touched it. If you use ExtJs, you are free to choose you backend. For ExtJs, the start is pretty straight forward :
get Sencha cmd and generate a skeleton app.
follow the tutorial
create one file per class definition.
the API docs are great. If you still lack something SO is great too.
what you have to find out by yourself is the exact way parameters are passed to the backend and how to format the response.

Kentico CMS + Backbone.js

I've seen some references to using Backbone.js with a CMS. I will be starting on a new project soon that will be using Kentico CMS. I'd like to use Backbone.js for the client side framework to make a "web app" experience that has it's content managed through Kentico (similar to the example Backbone gives on their website for USAToday).
Has anyone ever done this? It seems difficult due to Kentico's web framework. I'm sure it is possible to do, but at what cost? What functionality will be lost on the Kentico side? Will content managers still be able to change layout, rearrange webparts, add/delete webparts, update content within webparts, add/delete pages?
Any help or examples would be amazing! Thanks.
Kentico CMS comes with a RESTful API that is able to manipulate with all objects and documents in the system. So it's up to you what you implement on the client side. If you want to achieve push capabilities you will probably want to utilize SignalR (ASP.NET encapsulation of WebSockets). There is nice library that provides communication between Backbone.js and SignalR called Backbone.signalr. Last thing you should have a look at is a new system of events introduced in Kentico CMS 7 enabling to hook up to any document or object change.

Resources