In this talk, we’ll discuss the benefits of the document-based data model that MongoDB offers by walking through how one can build a simple app. We'll show you how to design a full-blown RSS Aggregation service to replace the loss the world suffered when Google Reader was shutdown.
We'll dive deeper into topics, such as how to model your data and create your REST API using MongoDB, Express.js and Node.js (core components of the MEAN stack). This session will jumpstart your development knowledge of MongoDB.
Presentation on MongoDB and Node.JS. We describe how to do basic CRUD operations (insert, remove, update, find) how to aggregate using node.js. We also discuss a bit of Meteor, MEAN Stack and other ODMs and projects on Javascript and MongoDB
Differential Sync and JSON Patch @ SpringOne2GX 2014Brian Cavalier
Craig Walls and I presented a new approach to client-server communication at SpringOne2GX 2014.
Abstract:
The world of client-server has changed. The traditional application of REST is no longer the best fit. We're depolying applications into a world where users expect responsive UIs, on all their devices, even while disconnected. We're deploying into a world where connection latency, mobile radio usage and battery life have become primary concerns.
Differential Synchronization (DS) is an algorithm that syncs data across N parties, even in the face of dropped connections, offline devices, etc. It makes more efficient use of connections by batching and sending only changes, in both directions, from client to server and from server to client. We’ll look at how it can be used with JSON Patch to synchronize application data between clients and servers over HTTP Patch, WebSocket, and STOMP, and how it can be integrated into the Spring ecosystem.
The first of its kind Web Technology Conference on Open Source Technology, WebOSS '07 was organised in Kolkata on Sat, 13th Oct 07 and I spoke at the event as one of the participants on "Building Applications using AJAX". Here I will share my presentation.
Presentation on MongoDB and Node.JS. We describe how to do basic CRUD operations (insert, remove, update, find) how to aggregate using node.js. We also discuss a bit of Meteor, MEAN Stack and other ODMs and projects on Javascript and MongoDB
Differential Sync and JSON Patch @ SpringOne2GX 2014Brian Cavalier
Craig Walls and I presented a new approach to client-server communication at SpringOne2GX 2014.
Abstract:
The world of client-server has changed. The traditional application of REST is no longer the best fit. We're depolying applications into a world where users expect responsive UIs, on all their devices, even while disconnected. We're deploying into a world where connection latency, mobile radio usage and battery life have become primary concerns.
Differential Synchronization (DS) is an algorithm that syncs data across N parties, even in the face of dropped connections, offline devices, etc. It makes more efficient use of connections by batching and sending only changes, in both directions, from client to server and from server to client. We’ll look at how it can be used with JSON Patch to synchronize application data between clients and servers over HTTP Patch, WebSocket, and STOMP, and how it can be integrated into the Spring ecosystem.
The first of its kind Web Technology Conference on Open Source Technology, WebOSS '07 was organised in Kolkata on Sat, 13th Oct 07 and I spoke at the event as one of the participants on "Building Applications using AJAX". Here I will share my presentation.
Updates to the java api for json processing for java ee 8Alex Soto
One of the additions of Java EE 7 was the JSON-P specification for processing JSON documents. But JSON-P spec is moving forward and for Java EE 8 it will come with a lot of new features like support for JSON Pointer (RFC6901), JSON Patch (RFC6902) or JSON Merge Patch (RFC7386). But also improvements on performance, Java 8 integration and how to process big JSON data.
The first part of this session presents the JSON Processing API that comes with Java EE 7 to understand the basis for improvements of next version. The second part of the session presents the updates that are coming on the Java API for JSON Processing that they will be added inside Java EE 8.
SOAP Web Services have a well established role in the enterprise, but aside from the many benefits of the WS-* standards, SOAP and XML also carry additional baggage for developers. Consequently, REST Web Services are gaining tremendous popularity within the developer community. This session will begin by comparing and contrasting the basic concepts of both SOAP and REST Web Services. Building on that foundation, Sam Brannen will show attendees how to implement SOAP-based applications using Spring-WS 2.0. He will then demonstrate how to build a similar REST-ful application using Spring MVC 3.0. The session will conclude with an in-depth look at both server-side and client-side development as well as efficient integration testing of Web Services using the Spring Framework.
Introducing RaveJS: Spring Boot concepts for JavaScript applicationsJohn Hann
Modern JavaScript frameworks have become quite sophisticated. Unfortunately, they have also become quite complicated. The demos and sample projects for these frameworks look deceptively simple. However, to build and deploy real applications, developers must scaffold, configure, and maintain a tremendous amount of intricate machinery. Until recently, the Java world wasn't very different. Spring Boot finally made it easy to create stand-alone, production-grade Spring Applications that can you can "just run". Can we do the same for JavaScript? Yes, we can! Introducing RaveJS. Rave eliminates configuration, machinery, and complexity. Stop configuring and tweaking machinery such as file watchers, minifiers, and transpilers just to get to a runnable app. Instead, go from zero to "hello world" in 30 seconds. In the next 30 seconds, easily add capabilities and frameworks to your application simply by installing *Rave Extensions* and *Rave Starter* packages from npm and Bower, the leading JavaScript package managers. Finally, install additional *Rave Extension* packages to apply your favorite build, deploy, and testing patterns.
Building Beautiful REST APIs in ASP.NET CoreStormpath
Core 1.0 is the latest iteration of ASP.NET. What’s changed? Everything! Nate Barbettini, .NET Developer Evangelist at Stormpath, does a deep dive on how to build RESTful APIs the right way on top of ASP.NET Web API.
MongoDB Days UK: Building an Enterprise Data Fabric at Royal Bank of Scotland...MongoDB
Presented by Michael Fulke, Development Team Lead, Royal Bank of Scotland
Experience level: Beginner
When addressing common investment banking use-cases, incumbent application architectures have proven themselves to be complex, difficult to maintain and expensive. Driven by the apparently competing pressures of cost and agility, RBS used MongoDB to build a common enterprise data fabric which is underpinning several core trading platforms. In this session, you will learn how RBS has successfully integrated MongoDB into a wider Java-based architecture, built with a strong open source bias.
Updates to the java api for json processing for java ee 8Alex Soto
One of the additions of Java EE 7 was the JSON-P specification for processing JSON documents. But JSON-P spec is moving forward and for Java EE 8 it will come with a lot of new features like support for JSON Pointer (RFC6901), JSON Patch (RFC6902) or JSON Merge Patch (RFC7386). But also improvements on performance, Java 8 integration and how to process big JSON data.
The first part of this session presents the JSON Processing API that comes with Java EE 7 to understand the basis for improvements of next version. The second part of the session presents the updates that are coming on the Java API for JSON Processing that they will be added inside Java EE 8.
SOAP Web Services have a well established role in the enterprise, but aside from the many benefits of the WS-* standards, SOAP and XML also carry additional baggage for developers. Consequently, REST Web Services are gaining tremendous popularity within the developer community. This session will begin by comparing and contrasting the basic concepts of both SOAP and REST Web Services. Building on that foundation, Sam Brannen will show attendees how to implement SOAP-based applications using Spring-WS 2.0. He will then demonstrate how to build a similar REST-ful application using Spring MVC 3.0. The session will conclude with an in-depth look at both server-side and client-side development as well as efficient integration testing of Web Services using the Spring Framework.
Introducing RaveJS: Spring Boot concepts for JavaScript applicationsJohn Hann
Modern JavaScript frameworks have become quite sophisticated. Unfortunately, they have also become quite complicated. The demos and sample projects for these frameworks look deceptively simple. However, to build and deploy real applications, developers must scaffold, configure, and maintain a tremendous amount of intricate machinery. Until recently, the Java world wasn't very different. Spring Boot finally made it easy to create stand-alone, production-grade Spring Applications that can you can "just run". Can we do the same for JavaScript? Yes, we can! Introducing RaveJS. Rave eliminates configuration, machinery, and complexity. Stop configuring and tweaking machinery such as file watchers, minifiers, and transpilers just to get to a runnable app. Instead, go from zero to "hello world" in 30 seconds. In the next 30 seconds, easily add capabilities and frameworks to your application simply by installing *Rave Extensions* and *Rave Starter* packages from npm and Bower, the leading JavaScript package managers. Finally, install additional *Rave Extension* packages to apply your favorite build, deploy, and testing patterns.
Building Beautiful REST APIs in ASP.NET CoreStormpath
Core 1.0 is the latest iteration of ASP.NET. What’s changed? Everything! Nate Barbettini, .NET Developer Evangelist at Stormpath, does a deep dive on how to build RESTful APIs the right way on top of ASP.NET Web API.
MongoDB Days UK: Building an Enterprise Data Fabric at Royal Bank of Scotland...MongoDB
Presented by Michael Fulke, Development Team Lead, Royal Bank of Scotland
Experience level: Beginner
When addressing common investment banking use-cases, incumbent application architectures have proven themselves to be complex, difficult to maintain and expensive. Driven by the apparently competing pressures of cost and agility, RBS used MongoDB to build a common enterprise data fabric which is underpinning several core trading platforms. In this session, you will learn how RBS has successfully integrated MongoDB into a wider Java-based architecture, built with a strong open source bias.
Big Data Analysis Patterns - TriHUG 6/27/2013boorad
Big Data Analysis Patterns: Tying real world use cases to strategies for analysis using big data technologies and tools.
Big data is ushering in a new era for analytics with large scale data and relatively simple algorithms driving results rather than relying on complex models that use sample data. When you are ready to extract benefits from your data, how do you decide what approach, what algorithm, what tool to use? The answer is simpler than you think.
This session tackles big data analysis with a practical description of strategies for several classes of application types, identified concretely with use cases. Topics include new approaches to search and recommendation using scalable technologies such as Hadoop, Mahout, Storm, Solr, & Titan.
Development Platform as a Service - erfarenheter efter ett års användning - ...IBM Sverige
Presentation från IBM Smarter Business 2011. Spår: Utveckla produkter och tjänster kostnadseffektivt.
Ta del av Tietos erfarenheter inom implementation av agil utveckling och Application Lifecycle Management med IBM Rationals lösningar. Presentationen visar på ett antal olika exempel på implementationer, och en representant från en svensk kund berättar om sina erfarenheter från ett års användning av IBM och Tietos Cloudbaserad utvecklingsplattform, DpaaS.
Talare: Per Engman, Business Development, Tieto.
Mer information på www.smarterbusiness.se
MongoDB Days UK: Using MongoDB and Python for Data Analysis PipelinesMongoDB
Presented by Eoin Brazil, Proactive Technical Services Engineer, MongoDB
Experience level: Advanced
MongoDB offers a flexible, scalable, and easy way to store your large data set. Python provides many useful data science tools (e.g. NumPy, SciPy, Scikit-learn, etc.). This talk will discuss the concerns for creating operational data analytic pipelines, introduce Monary as alternative for loading data into NumPy, and give examples of accessing data with Monary, as well as how to build scalable data analysis pipelines using these open source tools.
Apache Airflow (incubating) NL HUG Meetup 2016-07-19Bolke de Bruin
Introduction to Apache Airflow (Incubating), best practices and roadmap. Airflow is a platform to programmatically author, schedule and monitor workflows.
A brief history of Instagram's adoption cycle of the open source distributed database Apache Cassandra, in addition to details about it's use case and implementation. This was presented at the San Francisco Cassandra Meetup at the Disqus HQ in August 2013.
A user's perspective on SaltStack and other configuration management toolsSaltStack
Aurelien Geron uses SaltStack to manage a few VMs running Django web apps based on a sharded mongodb cluster. He had struggled with another configuration management tool for months but then read about Saltstack and decided to try it out. For Aurelien SaltStack just works, it's plain and simple, powerful, configurable and ultra-fast. This is his presentation.
MongoDB for Time Series Data Part 2: Analyzing Time Series Data Using the Agg...MongoDB
The United States will be deploying 16,000 traffic speed monitoring sensors - 1 on every mile of US interstate in urban centers. These sensors update the speed, weather, and pavement conditions once per minute. MongoDB will collect and aggregate live sensor data feeds from roadways around the country, support real-time queries from cars on traffic conditions on their route as well as be the platform for real-time dashboards displaying traffic conditions and more complex analytical queries used to identify traffic trends. In this session, we’ll implement a few different data aggregation techniques to query and dashboard the metrics gathered from the US interstate.
Webinar: 10-Step Guide to Creating a Single View of your BusinessMongoDB
Organizations have long seen the value in aggregating data from multiple systems into a single, holistic, real-time representation of a business entity. That entity is often a customer. But the benefits of a single view in enhancing business visibility and operational intelligence can apply equally to other business contexts. Think products, supply chains, industrial machinery, cities, financial asset classes, and many more.
However, for many organizations, delivering a single view to the business has been elusive, impeded by a combination of technology and governance limitations.
MongoDB has been used in many single view projects across enterprises of all sizes and industries. In this session, we will share the best practices we have observed and institutionalized over the years. By attending the webinar, you will learn:
- A repeatable, 10-step methodology to successfully delivering a single view
- The required technology capabilities and tools to accelerate project delivery
- Case studies from customers who have built transformational single view applications on MongoDB.
With the growing interest in the API economy, IBM Integration Bus (IIB) has provided many recent enhancements in the area of REST APIs and JSON support. This session will discuss how to create an IIB REST API, either from scratch or starting from a Swagger (OpenAPI specification) document. We will also cover the new JSON Schema support for the Graphical Data Mapper, and the new REST Request node for calling REST APIs from IIB, which can be easily configured by drag-and-drop. Easy integration of IIB Rest APIs with an API Connect catalog is also possible, from both the IIB Toolkit and the IIB Web UI. We will talk through these new capabilities and how they relate to IBM's Application Integration Suite (AIS) solution.
MongoDB Days UK: Building Apps with the MEAN StackMongoDB
Presented by Norberto Leite, Developer Advocate, MongoDB
Experience level: Advanced
Get ready to be MEAN! The MEAN Stack (MongoDB, ExpressJS, AngularJS and Node.js) allows developers to do rapid application development and application scaffolding. In this session, Norberto will walk you through strategies and best practices for building applications on the MEAN stack, the benefits of using such an application stack and the key benefits of each of the individual components.
RESTful API, nevidljiva spona koja spaja web-facing mobilne aplikacije sa online bazama podataka, server-side ishodište koje pokreće Javascript MVVM-based projekte često je nedovoljno istraženo područje čak i za iskusne programere. Ako vas zanima POST - PUT rat ili stvari poput idempotentnih nesigurnih metoda odgovore ćete pronaći u ovom predavanju.
Predavanje je održano 27. aprila 2014. godine u Beogradu na Google Code Day http://gcd.phpsrbija.rs/
This session will provide attendees with hands-on experience and in-depth knowledge of using Node.js as a runtime environment and Express.js as a web framework to build scalable and fast backend systems. Additionally, attendees will learn about Passport.js, a popular authentication middleware for Node.js, and how to use Prisma ORM to handle database operations in a type-safe and efficient manner.
The session will be conducted by experienced developers who have worked with these technologies and will be able to provide valuable insights and best practices. The session will be interactive and include plenty of opportunities for attendees to ask questions and work on real-world projects.
To create a project with node.js either for mobile applications to access data or for various clients based websites which requires accessing data; it requires building a basic API. These projects, mostly built with express.js and a mango database. In this article we will understand
the basic of Node.js, express middleware and API creation/Restful web services using Node.js with one basic example.
Resting on your laurels will get you pownedDinis Cruz
Presentation delivered at BlackHat 2013. See these posts for more details on the Demos: http://blog.diniscruz.com/2013/08/using-xmldecoder-to-execute-server-side.html ., http://blog.diniscruz.com/2013/08/neo4j-csrf-payload-to-start-processes.html
Integrate MongoDB & SQL data with a single REST APIEspresso Logic
Webinar slides. Describes how you create a backend application, in the cloud or on premise, that join data from MongoDb and SQL databases with a single RESTful API.
BASE is an open source python framework based on tornado asynchronous web framework, which represents an upgrade by adding a decorators library that enables fast and simple development of REST-API based applications and it reduces the need for coding frequently used segments of code. Besides that, BASE can be used as an engine for web sites.
Unele persoane au dificultăţi în alegerea ţinutei potrivite pentru un anumit tip de eveniment (interviu, dineu oficial, spectacol etc.). Să se dezvolte o aplicaţie Web care permite alegerea pieselor de îmbrăcăminte corespunzătoare pe baza garderobei existente – diversele informaţii de interes pot fi preluate de la DBpedia sau Freebase. Se vor oferi sugestii conform tendinţelor modei, sezonului, cromaticii dorite şi/sau stilului vestimentar adoptat de persoana respectivă. De asemenea, se vor pune la dispoziţie informaţii utile referitoare la achiziţionarea unor produse de interes, în funcţie de localizarea geografică a utilizatorului.
The Query Service is the new platform solution for querying a variety of data sources. The goal of Query Service is that administrators can configure a metadata description of the data source that can then be used by end users without detailed knowledge of the underlying data source. This session explains how to configure Query Service data sources and use them with the RESTful API or component collection.
A complete boot camp for beginners who want to learn Spring Boot.
In this course, you'll learn how we can create web services and cover all the topics of Spring Boot, Spring Framework, and many others.
If you've some experience in Java and want to be a Software Engineer or Java Developer using Spring, you're on right way.
Just read and practice, in the end of this course you'll have a great knowledge of Spring boot, a backend knowledge.
Course outline:
JPA, Hibernate, Spring, Spring Framework, H2 Database, PostgreSQL, MySQL.
#SpringBoot
#SpringFramwork
#MySQL
#PostgreSQL
#MySQL
#H2
#JPA/Hibernate
#Webservices
Similar to Building Your First App with MongoDB (20)
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB
During this talk we'll navigate through a customer's journey as they migrate an existing MongoDB deployment to MongoDB Atlas. While the migration itself can be as simple as a few clicks, the prep/post effort requires due diligence to ensure a smooth transfer. We'll cover these steps in detail and provide best practices. In addition, we’ll provide an overview of what to consider when migrating other cloud data stores, traditional databases and MongoDB imitations to MongoDB Atlas.
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB
These days, everyone is expected to be a data analyst. But with so much data available, how can you make sense of it and be sure you're making the best decisions? One great approach is to use data visualizations. In this session, we take a complex dataset and show how the breadth of capabilities in MongoDB Charts can help you turn bits and bytes into insights.
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB
MongoDB Kubernetes operator and MongoDB Open Service Broker are ready for production operations. Learn about how MongoDB can be used with the most popular container orchestration platform, Kubernetes, and bring self-service, persistent storage to your containerized applications. A demo will show you how easy it is to enable MongoDB clusters as an External Service using the Open Service Broker API for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB
Are you new to schema design for MongoDB, or are you looking for a more complete or agile process than what you are following currently? In this talk, we will guide you through the phases of a flexible methodology that you can apply to projects ranging from small to large with very demanding requirements.
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB
Humana, like many companies, is tackling the challenge of creating real-time insights from data that is diverse and rapidly changing. This is our journey of how we used MongoDB to combined traditional batch approaches with streaming technologies to provide continues alerting capabilities from real-time data streams.
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB
Time series data is increasingly at the heart of modern applications - think IoT, stock trading, clickstreams, social media, and more. With the move from batch to real time systems, the efficient capture and analysis of time series data can enable organizations to better detect and respond to events ahead of their competitors or to improve operational efficiency to reduce cost and risk. Working with time series data is often different from regular application data, and there are best practices you should observe.
This talk covers:
Common components of an IoT solution
The challenges involved with managing time-series data in IoT applications
Different schema designs, and how these affect memory and disk utilization – two critical factors in application performance.
How to query, analyze and present IoT time-series data using MongoDB Compass and MongoDB Charts
At the end of the session, you will have a better understanding of key best practices in managing IoT time-series data with MongoDB.
Join this talk and test session with a MongoDB Developer Advocate where you'll go over the setup, configuration, and deployment of an Atlas environment. Create a service that you can take back in a production-ready state and prepare to unleash your inner genius.
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB
Our clients have unique use cases and data patterns that mandate the choice of a particular strategy. To implement these strategies, it is mandatory that we unlearn a lot of relational concepts while designing and rapidly developing efficient applications on NoSQL. In this session, we will talk about some of our client use cases, the strategies we have adopted, and the features of MongoDB that assisted in implementing these strategies.
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB
Encryption is not a new concept to MongoDB. Encryption may occur in-transit (with TLS) and at-rest (with the encrypted storage engine). But MongoDB 4.2 introduces support for Client Side Encryption, ensuring the most sensitive data is encrypted before ever leaving the client application. Even full access to your MongoDB servers is not enough to decrypt this data. And better yet, Client Side Encryption can be enabled at the "flick of a switch".
This session covers using Client Side Encryption in your applications. This includes the necessary setup, how to encrypt data without sacrificing queryability, and what trade-offs to expect.
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB
MongoDB Kubernetes operator is ready for prime-time. Learn about how MongoDB can be used with most popular orchestration platform, Kubernetes, and bring self-service, persistent storage to your containerized applications.
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB
These days, everyone is expected to be a data analyst. But with so much data available, how can you make sense of it and be sure you're making the best decisions? One great approach is to use data visualizations. In this session, we take a complex dataset and show how the breadth of capabilities in MongoDB Charts can help you turn bits and bytes into insights.
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB
When you need to model data, is your first instinct to start breaking it down into rows and columns? Mine used to be too. When you want to develop apps in a modern, agile way, NoSQL databases can be the best option. Come to this talk to learn how to take advantage of all that NoSQL databases have to offer and discover the benefits of changing your mindset from the legacy, tabular way of modeling data. We’ll compare and contrast the terms and concepts in SQL databases and MongoDB, explain the benefits of using MongoDB compared to SQL databases, and walk through data modeling basics so you feel confident as you begin using MongoDB.
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB
Join this talk and test session with a MongoDB Developer Advocate where you'll go over the setup, configuration, and deployment of an Atlas environment. Create a service that you can take back in a production-ready state and prepare to unleash your inner genius.
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB
Query performance should be the unsung hero of an application, but without proper configuration, can become a constant headache. When used properly, MongoDB provides extremely powerful querying capabilities. In this session, we'll discuss concepts like equality, sort, range, managing query predicates versus sequential predicates, and best practices to building multikey indexes.
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB
Aggregation pipeline has been able to power your analysis of data since version 2.2. In 4.2 we added more power and now you can use it for more powerful queries, updates, and outputting your data to existing collections. Come hear how you can do everything with the pipeline, including single-view, ETL, data roll-ups and materialized views.
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB
Are you new to schema design for MongoDB, or are you looking for a more complete or agile process than what you are following currently? In this talk, we will guide you through the phases of a flexible methodology that you can apply to projects ranging from small to large with very demanding requirements.
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB
MongoDB Atlas Data Lake is a new service offered by MongoDB Atlas. Many organizations store long term, archival data in cost-effective storage like S3, GCP, and Azure Blobs. However, many of them do not have robust systems or tools to effectively utilize large amounts of data to inform decision making. MongoDB Atlas Data Lake is a service allowing organizations to analyze their long-term data to discover a wealth of information about their business.
This session will take a deep dive into the features that are currently available in MongoDB Atlas Data Lake and how they are implemented. In addition, we'll discuss future plans and opportunities and offer ample Q&A time with the engineers on the project.
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB
Virtual assistants are becoming the new norm when it comes to daily life, with Amazon’s Alexa being the leader in the space. As a developer, not only do you need to make web and mobile compliant applications, but you need to be able to support virtual assistants like Alexa. However, the process isn’t quite the same between the platforms.
How do you handle requests? Where do you store your data and work with it to create meaningful responses with little delay? How much of your code needs to change between platforms?
In this session we’ll see how to design and develop applications known as Skills for Amazon Alexa powered devices using the Go programming language and MongoDB.
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB
aux Core Data, appréciée par des centaines de milliers de développeurs. Apprenez ce qui rend Realm spécial et comment il peut être utilisé pour créer de meilleures applications plus rapidement.
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB
Il n’a jamais été aussi facile de commander en ligne et de se faire livrer en moins de 48h très souvent gratuitement. Cette simplicité d’usage cache un marché complexe de plus de 8000 milliards de $.
La data est bien connu du monde de la Supply Chain (itinéraires, informations sur les marchandises, douanes,…), mais la valeur de ces données opérationnelles reste peu exploitée. En alliant expertise métier et Data Science, Upply redéfinit les fondamentaux de la Supply Chain en proposant à chacun des acteurs de surmonter la volatilité et l’inefficacité du marché.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
3. 3
• Introduction to the MEAN Stack
• What is a REST API?
• Creating our REST API
• Defining our Data Model
• Real-life authentication using Stormpath
• Javascript Quirks
• WRITE YOUR TESTS FIRST
• Let’s look at some application code
Agenda
5. 5
• M = MongoDB/Mongoose.js, the most popular
nosql operational database
• E = Express.js, a lightweight web application
framework
• A = Angular.js, a robust framework for creating
HTML5 and Javascript rich web applications
• N = Node.js, a server-side javascript interpreter
The MEAN Stack
A modern replacement for LAMP
7. 7
• REST = “Representation State Transfer”
• Essentially it’s just a lighter weight, though not-
standardized, alternative to SOAP and WSDL XML-
based API protocols
• Uses a client-server model, where the server is actually
an HTTP server
• Client sends HTTP verbs (GET, POST, PUT, DELETE)
along with a URL and variable parameters that are
urlencoded
• The URL tells us what object to act on
• Server replies with a result code and valid JSON
What is a REST API?
8. 8
• GET – When a client wants to read an object.
• POST – Went a client wants to insert/create an
object.
• PUT – When a client wants to update an object.
• DELETE – When a client wants to delete an
object
HTTP Verbs – Mapping to CRUD
9. 9
• Some common codes we might use
– 200 – “OK”
– 201 – “Created” (Used with POST)
– 400 – “Bad Request” (Perhaps missing required
parameters)
– 401 – “Unauthorized” (Missing authentication
parameters)
– 403 – “Forbidden” (You were authenticated but lacking
required privileges)
– 404 – “Not Found”
• http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
HTTP Result Codes
10. 10
• Things you might want to say to me me at this
point:
– “REST APIs aren’t sexy”
– “How am I supposed to show this off to my boss?”
– “My clients wants to see a fancy website or mobile app”
• REST APIs are a way for you to create a data
service enabling you to easily create all your
other applications
– HTML5 / Javascript
– Android
– iOS
Why are we starting with a REST API?
11. 11
• Because all the VC Money is in creating apps that
are So-Lo-Mo-Co, lots of new startups don’t even
have a web interface, such as:
– Uber
– WhatsApp
– Postmates
– Wash.io
• Creating a REST API also allows other
companies/applications to easily plug-in to your
application as well, turning your application into a
platform and making it more powerful
New companies don’t have an HTML Interface
13. 13
• We’ll be building an RSS Aggregation application, similar
to our dearly departed Google Reader
• Our application today will have two components
– The REST API
– The Feed Grabber
• Since the point of today’s talk is to learn about creating a
REST API and not the intricacies of RSS feeds, we won’t
be discussing the feed grabber
Let’s build an application!
14. 14
• We’ll need to define data models for and store the
following data:
– Users
– RSS Feeds
– Feed Entries
– User Feed Subscriptions
– Which feed entries a user has already read
• We’ll need to allow users to:
– Create an account
– Subscribe/unsubscribe to feeds
– Read feed entries
– Mark feeds/entries as read or unread
Let’s build an application!
Data Models
15. 15
{
"_id" : ObjectId("523b1153a2aa6a3233a913f8"),
"requiresAuthentication" : false,
"modifiedDate" : ISODate("2014-08-29T17:40:22Z"),
"permanentlyRemoved" : false,
"feedURL" : "http://feeds.feedburner.com/eater/nyc",
"title" : "Eater NY",
"bozoBitSet" : false,
"enabled" : true,
"etag" : "4bL78iLSZud2iXd/vd10mYC32BE",
"link" : "http://ny.eater.com/",
"permanentRedirectURL" : null,
"description" : "The New York City Restaurant, Bar, and Nightlife
Blog”
}
Data Model Design
Feed Collection
16. 16
{
"_id" : ObjectId("523b1153a2aa6a3233a91412"),
"description" : "Buzzfeed asked a bunch of people…”,
"title" : "Cronut Mania: Buzzfeed asked a bunch of people...",
"summary" : "Buzzfeed asked a bunch of people that were…”,
"content" : [
{
"base" : "http://ny.eater.com/",
"type" : "text/html",
"value" : ”LOTS OF HTML HERE",
"language" : "en"
}
],
"entryID" : "tag:ny.eater.com,2013://4.560508",
"publishedDate" : ISODate("2013-09-17T20:45:20Z"),
"link" : "http://ny.eater.com/archives/2013/09/cronut_mania_41.php",
"feedID" : ObjectId("523b1153a2aa6a3233a913f8")
}
Data Model Design
Feed Entry Collection
19. 19
• We’ll need to allow users to:
– Create an account
– Subscribe/unsubscribe to feeds
– Read feed entries
– Mark feeds/entries as read or unread
Let’s build an application!
User Actions
20. 20
Creating our REST API
Route Verb Description Variables
/user/enroll POST Register a
new user
firstName
lastName
email
password
/user/resetPassword PUT Password
Reset
email
/feeds GET Get feed
subscriptions
for each user
with
description
and unread
count
/feeds/subscribe PUT Subscribe to
a new feed
feedURL
21. 21
Creating our REST API
Route Verb Description Variables
/feeds/entries GET Get all entries
for feeds the
user is
subscribed to
/feeds/<feedid>/entries GET Get all entries
for a specific
feed
/feeds/<feedid> PUT Mark all
entries for a
specific feed
as read or
unread
read = <true
| false>
22. 22
Creating our REST API
Route Verb Description Variables
/feeds/<feedid>/entries/<entryid> PUT Mark a
specific entry
as either read
or unread
read = <true
| false>
/feeds/<feedid> DELETE Unsubscribe
from this
particular
feed
24. 24
Using Stormpath for Authentication
• “User Management as a
Service”
– Authentication
– Authorization
– API Keys
• REST JSON API +
– Node SDK
– Express Plugin
– Passport Plugin
25. 25
Using Stormpath for Authentication
• Stormpath will give us a secret key for each “Application” we
define with them. These applications can be “Reader Prod”,
“Reader Test”, etc.
• Stormpath will give us an API Key Properties file as well
• We can define password strength requirements for each
application, like
– Must have >= 8 characters
– Must include lowercase and uppercase
– Must include a number
– Must include a non-alphabetic character
• Stormpath keeps track of all of our users and assigns them
API Keys which we can use for our REST API Authentication
27. 27
Creating a Node.js Application
• Install node.js
– http://nodejs.org/download/
• Node.js applications are built using a lot of library modules
• You define a package.json file describing your application and
all of it’s library dependencies
• You use the Node.js Package Manager to install a copy of
those libraries in a subdirectory of your application
(node_modules/) instead of a system directly (like /usr/lib) to
avoid the problem of different apps needing different and
conflicting library versions
• Run “npm install” and it will create the node_modules/ with all
of your required libraries
29. 29
Async Code in Javascript
function foo() {
someAsyncFunction(params, function(err, results) {
console.log(“one”);
});
console.log(“two”);
}
At first glance you might expect the output to be:
one
two
But actually it’s the reverse because the line that prints “one”
happens later, asynchronously, in the callback
30. 30
Async Library
https://github.com/caolan/async
actionArray = [
function one(cb) {
someAsyncFunction(params, function(err, results) {
if (err) {
cb(new Error(“There was an error”));
}
console.log(“one”);
cb(null);
});
},
function two(cb) {
console.log(“two”);
cb(null);
}]
]
Async.series(actionArray);
43. 43
Using frisby.js to define test cases
test/create_accounts_spec.js (continued)
frisby.create('POST enroll duplicate user ')
.post(tc.url + '/user/enroll',
{ 'firstName' : TEST_USERS[0].fn,
'lastName' : TEST_USERS[0].ln,
'email' : TEST_USERS[0].email,
'password' : TEST_USERS[0].pwd })
.expectStatus(400)
.expectHeader('Content-Type', 'application/json; charset=utf-8')
.expectJSON({'error' : 'Account with that email already exists. Please choose
another email.'})
.toss()
44. 44
Using frisby.js to define test cases
Need to create /tmp/readerTestCreds.js
We want to dynamically create a file that looks like this for us to use in defining
test cases that require us to authenticate a user:
TEST_USERS =
[{ "_id":"54ad6c3ae764de42070b27b1",
"email":"testuser1@example.com",
"firstName":"Test",
"lastName":"User1",
"sp_api_key_id":”<API KEY ID>",
"sp_api_key_secret":”<API KEY SECRET>”
},
{ "_id":"54ad6c3be764de42070b27b2”,
"email":"testuser2@example.com",
"firstName":"Test",
"lastName":"User2”,
"sp_api_key_id":”<API KEY ID>",
"sp_api_key_secret":”<API KEY SECRET>”
}];
module.exports = TEST_USERS;
45. 45
Using frisby.js to define test cases
tests/writeCreds.js
TU_EMAIL_REGEX = new RegExp('^testuser*');
SP_APP_NAME = 'Reader Test';
TEST_CREDS_TMP_FILE = '/tmp/readerTestCreds.js';
var async = require('async');
var dbConfig = require('./config/db.js');
var mongodb = require('mongodb');
assert = require('assert');
var mongoClient = mongodb.MongoClient
var reader_test_db = null;
var users_array = null;
46. 46
Using frisby.js to define test cases
tests/writeCreds.js (continued)
function connectDB(callback) {
mongoClient.connect(dbConfig.testDBURL, function(err, db) {
assert.equal(null, err);
reader_test_db = db;
callback(null);
});
}
function lookupUserKeys(callback) {
console.log("lookupUserKeys");
user_coll = reader_test_db.collection('user');
user_coll.find({email : TU_EMAIL_REGEX}).toArray(function(err, users) {
users_array = users;
callback(null);
});
}
47. 47
Using frisby.js to define test cases
tests/writeCreds.js (continued)
function writeCreds(callback) {
var fs = require('fs');
fs.writeFileSync(TEST_CREDS_TMP_FILE, 'TEST_USERS = ');
fs.appendFileSync(TEST_CREDS_TMP_FILE, JSON.stringify(users_array));
fs.appendFileSync(TEST_CREDS_TMP_FILE, '; module.exports = TEST_USERS;');
callback(0);
}
function closeDB(callback) {
reader_test_db.close();
}
async.series([connectDB, lookupUserKeys, writeCreds, closeDB]);
48. 48
Using frisby.js to define test cases
tests/feed_spec.js
TEST_USERS = require('/tmp/readerTestCreds.js');
var frisby = require('frisby');
var tc = require('./config/test_config');
var async = require('async');
var dbConfig = require('./config/db.js');
var dilbertFeedURL = 'http://feeds.feedburner.com/DilbertDailyStrip';
var nycEaterFeedURL = 'http://feeds.feedburner.com/eater/nyc';
function addEmptyFeedListTest(callback) {
var user = TEST_USERS[0];
frisby.create('GET empty feed list for user ' + user.email)
.get(tc.url + '/feeds')
.auth(user.sp_api_key_id, user.sp_api_key_secret)
.expectStatus(200)
.expectHeader('Content-Type', 'application/json; charset=utf-8')
.expectJSON({feeds : []})
.toss()
callback(null);
}
49. 49
Using frisby.js to define test cases
tests/feed_spec.js
function subOneFeed(callback) {
var user = TEST_USERS[0];
frisby.create('PUT Add feed sub for user ' + user.email)
.put(tc.url + '/feeds/subscribe',
{'feedURL' : dilbertFeedURL})
.auth(user.sp_api_key_id, user.sp_api_key_secret)
.expectStatus(201)
.expectHeader('Content-Type', 'application/json; charset=utf-8')
.expectJSONLength('user.subs', 1)
.toss()
callback(null);
}
50. 50
Using frisby.js to define test cases
tests/feed_spec.js
function subDuplicateFeed(callback) {
var user = TEST_USERS[0];
frisby.create('PUT Add duplicate feed sub for user ' + user.email)
.put(tc.url + '/feeds/subscribe',
{'feedURL' : dilbertFeedURL})
.auth(user.sp_api_key_id, user.sp_api_key_secret)
.expectStatus(201)
.expectHeader('Content-Type', 'application/json; charset=utf-8')
.expectJSONLength('user.subs', 1)
.toss()
callback(null);
}
51. 51
Using frisby.js to define test cases
tests/feed_spec.js
function subSecondFeed(callback) {
var user = TEST_USERS[0];
frisby.create('PUT Add second feed sub for user ' + user.email)
.put(tc.url + '/feeds/subscribe',
{'feedURL' : nycEaterFeedURL})
.auth(user.sp_api_key_id, user.sp_api_key_secret)
.expectStatus(201)
.expectHeader('Content-Type', 'application/json; charset=utf-8')
.expectJSONLength('user.subs', 2)
.toss()
callback(null);
}
52. 52
Using frisby.js to define test cases
tests/feed_spec.js
function subOneFeedSecondUser(callback) {
var user = TEST_USERS[1];
frisby.create('PUT Add one feed sub for second user ' + user.email)
.put(tc.url + '/feeds/subscribe',
{'feedURL' : nycEaterFeedURL})
.auth(user.sp_api_key_id, user.sp_api_key_secret)
.expectStatus(201)
.expectHeader('Content-Type', 'application/json; charset=utf-8')
.expectJSONLength('user.subs', 1)
.toss()
callback(null);
}
async.series([addEmptyFeedListTest, subOneFeed, subDuplicateFeed,
subSecondFeed, subOneFeedSecondUser]);
54. 54
Defining some utility libraries
config/db.js
module.exports = {
url : 'mongodb://localhost/reader_test'
}
// If we wanted to have different database URLs for Dev/QA/Prod we could have
// those here
55. 55
Defining some utility libraries
config/security.js
module.exports = {
stormpath_secret_key : ‘YOUR STORMPATH APPLICATION KEY’;
}
// If we wanted to turn on database authentication we could put that here
// This file will NOT get checked into source code control for obvious reasons
56. 56
Defining some utility libraries
config/stormpath_apikey.properties
apiKey.id = YOUR STORMPATH API KEY ID
apiKey.secret = YOUR STORMPATH API KEY SECRET
57. 57
Express.js Overview
• In express.js you create an “application” (app)
• That application listens on a particular port for HTTP requests
to come in
• When requests come in, they pass through a middleware
chain
– Each link in the middleware chain is given a req (the
request) object and a res object (to store the results)
– Each link can choose to do work, or pass it to the next link
• We add new middleware via app.use()
• The main middleware is called our “router”, which looks at the
URL and routes each different URL/Verb combo to a specific
handler function
58. 58
Creating our application!
server.js
var express = require('express');
var bodyParser = require('body-parser');
var mongoose = require('mongoose');
var stormpath = require('express-stormpath');
var routes = require("./app/routes");
var db = require('./config/db');
var security = require('./config/security');
var app = express();
var morgan = require('morgan’);
app.use(morgan);
app.use(stormpath.init(app, {
apiKeyFile: './config/stormpath_apikey.properties',
application: ‘YOUR SP APPLICATION URL',
secretKey: security.stormpath_secret_key
}));
var port = 8000;
mongoose.connect(db.url);
59. 59
Creating our application!
server.js (continued)
app.use(bodyParser.urlencoded({ extended: true }));
routes.addAPIRouter(app, mongoose, stormpath);
// Define our own middleware at the end of the chain to handle bad URLs
app.use(function(req, res, next){
res.status(404);
res.json({ error: 'Invalid URL' });
});
app.listen(port);
// shoutout to the user
console.log('Magic happens on port ' + port);
// expose app
exports = module.exports = app;
66. 66
Looking at our router code
Let’s go look at some real router code at:
https://github.com/ctindel/reader/blob/master/api/v1.0/app/routes.js
67. 67
Starting the server and running tests
• Make sure your mongodb instance is running
– mongod
• Install the Node Libraries
– npm install
• Start the REST API server
– node server.js
• Run test cases
– node setup_tests.js
– jasmine-node create_accounts_error_spec.js
– jasmine-node create_accounts_spec.js
– node write_creds.js
– jasmine-node feed_spec.js
68. 68
For More Information
Resource Location
My github repo github.com/ctindel/reader
MongoDB Downloads mongodb.com/download
Free Online Training education.mongodb.com
Webinars and Events mongodb.com/events
White Papers mongodb.com/white-papers
Case Studies mongodb.com/customers
Presentations mongodb.com/presentations
Documentation docs.mongodb.org
Additional Info info@mongodb.com
Resource Location
Editor's Notes
If you’ve never done javascript, never used MongoDB, or never built a REST API it is easy to get overwhelmed when faced with the task of pulling it all together.
Especially because there isn’t a website that shows you how to do everything.
We’ll attempt to break it down into manageable chunks so that each is easy to understand when we pull it all together later in code.
This isn’t going to be a detailed discussion of Schema Design, Javascript programming, MongoDB Deployment Technologies. We have in-depth webinars on MongoDB topics that have already been recorded and that will be scheduled in the future.
This webinar will be code and example intensive, but people at all skill levels will have something to learn here.
Today we won’t be using angular as we aren’t building an HTML user interface. We’re building a REST API which has no user interface but could be used to build any kind of interface like a website, or an Android application or an iOS application.
The fact that the server replies with JSON (Javascript Object Notation) makes the MEAN stack particularly well-suited to this task as all the components are in Javascript and MongoDB uses JSON notation to hold its data.
We’ll explain what JSON looks like when we start defining our Data Models later in the presentation
Before we dive in, it’s important to review that Javascript code is designed to be asynchronous. So any function which does blocking I/O like reading from a socket or querying a database will take a callback function as the last parameter, and then continue with the control flow, only returning to that callback function once the blocking operation completed.
MongoDB has a traditional hierarchical structure similar to an RDBMS. Our nomenclature is Database->Collection->Document->Key/Value Field
Sometimes we embed objects and arrays of objects directly, and sometimes we use a normalized model with mapping tables
This is what JSON looks like (Javascript Object Notation) and is how data is modeled and stored in MongoDB
MongoDB has a traditional hierarchical structure similar to an RDBMS. Our nomenclature is Database->Collection->Document->Key/Value Field
MongoDB has a traditional hierarchical structure similar to an RDBMS. Our nomenclature is Database->Collection->Document->Key/Value Field
, and then continue with the control flow, only returning to that callback function once the blocking operation completed.
Before we dive in, it’s important to review that Javascript code is designed to be asynchronous. So any function which does blocking I/O like reading from a socket or querying a database will take a callback function as the last parameter, and then continue with the control flow, only returning to that callback function once the blocking operation completed.
This library is so important to how we do things that it’s worth calling out specially
Before we dive in, it’s important to review that Javascript code is designed to be asynchronous. So any function which does blocking I/O like reading from a socket or querying a database will take a callback function as the last parameter, and then continue with the control flow, only returning to that callback function once the blocking operation completed.
Dynamically creating code on the fly is basically how viruses work. Remember kids, always use your power for good and not for evil.
Note the use of .auth here finally
If you’ll remember our test cases are expecting a return payload with the content type set to “application/json”
This code will do it for all requests automatically
If you’ll remember our test cases are expecting a return payload with the content type set to “application/json”
This code will do it for all requests automatically
Note that our first route doesn’t require authentication but our second two routes do. That’s all it takes to use stormpath!
If you’ll remember our test cases are expecting a return payload with the content type set to “application/json”
This code will do it for all requests automatically
Note that our first route doesn’t require authentication but our second two routes do. That’s all it takes to use stormpath!