Menu icon Foundation
Foundation Apps Advice

Hi,

Im new to Foundation Apps but i love the ease of use for prototyping etc. I am currently developing a single page app and was thinking about using AngularJS but since ive used Foundation Apps I really want to include the UI and grid system.

My question is... Do I use an Angular project and try and shoehorn in Foundations Apps or do I just use Foundation Apps?

If I use Foundation apps then is it easy to deploy and run in production? How can I use routing to give the feel of a website (http://www.someurl.com/) for the home page but then http://www.someurl.com/app/ for the app itself...is this possible? How can I handle authentication ? Im thinking of using PHP for the back end stuff but am not sure how to tie this in in terms of a session when a user is authenticated and then how to protect certain pages.

The other option is to add the FA's UI to AngularJS project (which would be easier) but I cant find how to do this and have not successfully accomplished this as yet. If this is the better way to do things then how do I go about it?

Thanks for your help... i'm an old school Java developer so im only just getting in to all this Angular / Foundation stuff.

Alex

AngularJSFoundation Appsadvice

Hi,

Im new to Foundation Apps but i love the ease of use for prototyping etc. I am currently developing a single page app and was thinking about using AngularJS but since ive used Foundation Apps I really want to include the UI and grid system.

My question is... Do I use an Angular project and try and shoehorn in Foundations Apps or do I just use Foundation Apps?

If I use Foundation apps then is it easy to deploy and run in production? How can I use routing to give the feel of a website (http://www.someurl.com/) for the home page but then http://www.someurl.com/app/ for the app itself...is this possible? How can I handle authentication ? Im thinking of using PHP for the back end stuff but am not sure how to tie this in in terms of a session when a user is authenticated and then how to protect certain pages.

The other option is to add the FA's UI to AngularJS project (which would be easier) but I cant find how to do this and have not successfully accomplished this as yet. If this is the better way to do things then how do I go about it?

Thanks for your help... i'm an old school Java developer so im only just getting in to all this Angular / Foundation stuff.

Alex

Luke Pettway about 4 years ago

I've been using Foundation for Apps for a project where I need to track domains and send email notices to people. I build the API using SLIM which is a great php framework and it has been pretty straightforward and seamless.

The thing that is going to make your life easier is that a lot of the routing is already handled by Foundation for Apps so you don't have to go in and manually set up very much. I haven't gotten to the authorization part of the process yet but I know that angular can handle the authentication of users and sessions very well.

Using their out of the box solution to me would be the better option, it saved me a lot of time and headaches up front.

James Stone about 4 years ago

You might take a look at the gulp file and see what is going on. F4A has 4 main components:

1) javascript via bower (angular, ui-router, f4a, etc)
2) your local app javascript
3) sass / scss files, compiled into a single css file
4) your angular templates (for ui-router)

You could add these to a new project or use the f4a gulp project as the basis for another project. Just depends on how much of the f4a gulp workflow you want to keep.

I would recommend reading up on ui-router since f4a is largely dependent on it. I highly recommend the official docs and perhaps taking a look at the egghead.io videos on this topic. Egghead is also a great resource for angular in general and might offer you some great starting points in developing front-end patterns and interaction.

I can't speak to php or specific frameworks. Angular should be agnostic. You can easily use it with any restful API.

Angularfire and Firebase might be a good way to prototype and get started. It also provides basic and oauth authentication that works with Angular without too much effort. Oauth is easier to implement, basic requires you to handle a bunch of the interaction directly in JavaScript.

This way you could get started, test out your idea and research and figure out how to reimplement the backend in php if you want at your convenience.