Using angularjs with headless drupal1/18/2024 Creating order nodes in Drupal from the AngularJS app.Building the actual form in AngularJS that has dynamic components (ie showing/hiding toppings selection, order total, etc).Nesting ingredients into categories (ie meats, cheeses, veggies, etc).Things that we weren't able to get to include: Obviously, our apps are lacking a lot of functionality before they could be considered "production-ready". Sadly, we ran out of time before we could go any further but in the end, I think we covered a lot of ground. I'll admit, the app isn't that exciting at this point but the fact that we were able to manage content in Drupal, have it output in a standard format, and then use a completely decoupled application to view that data was very rewarding. If you're interested in working with the full app, it can be found here.Īfter configuring our controller to use $http to query our Drupal endpoint, and adding some markup to our orders view, we ended up with a list of ingredients from Drupal. This led to a small issue that all of the files were minified & uglified but given that we only had two hours to get things going, we forged ahead. I actually used Yeoman to generate this app but decided to just push up a build of the app since no one had had node and/or grunt installed. For this project, I created a starter app (which can be cloned/downloaded at github) that everyone downloaded so that they wouldn't have to start from zero. Create a view that ouput a json-formatted list of toppings with:Īfter creating the taxonomy, content type, and views, we created some sample ingredients and ended up with a pretty cool api endpoint for our ingredients.Toppings (taxonomy term reference) - Referencing Toppings.Quantity (number) - The number of pizzas being ordered.Create an Orders content type with the following fields:.In Stock (boolean) - Whether the topping was in stock.Thankfully, most in the room didn't have much trouble getting D8 up and running. For this project, we decided to go with the beta2 version of Drupal 8. Once we had a good understanding of our architecture and how everything needed to be structured, we moved to the Drupal side. However, lately a good portion of my time has been spent with AngularJS so that's the route we chose for this project. It's important to note that nearly any front-end framework could have been used for the customer-facing app. The second would be a separate AngularJS application that would serve a fairly dynamic form that customers would use to order our world-famous pie.īefore we dove in, we had to give an impromptu (and hopefully coherent) walkthrough of how AngularJS works and why we would chose to use it in this case. It would also be used to manage ingredient inventory and process orders. The first would use Drupal as a backend admin and data api. Our goal for the evening was to build two applications for our faux pizza company "Dangulo's" (special credit goes to Jeff Geerling for the name). I highly recommend reading through the info-graphic that he posted. Beaven Rudge wrote a great article discussing how important it is to take action against any public Drupal 7 site you've got up. Thankfully, everyone in the room was aware of the release and had taken action to patch their sites. Security Releaseįirst up, we discussed the recent security release for Drupal 7. I'll be honest, I didn't have time to fully plan the night out like I had hoped but everything actually turned out great and it was one of the most fun I've had at a meetup in a while. Last night I had the privilege of walking us through our first interactive Drupal meetup here in St.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |