This document discusses using Java and HTML5 platforms for desktop, web, and mobile applications. It covers key technologies like JSON, WebSockets, RESTful web services, and frameworks like Angular and Sencha. It also provides examples of building applications with these technologies, including a contacts app example in Java EE and Angular.
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016Codemotion
For developers used to working with frameworks like Spring, and Rails, Go's lack of advice on how to structure your application can be bewildering. Many new developers, reach for their favourite Spring, or Rails equivalent, and rely on its structure, but that is a mistake! Go gives us wonderful tools to put Domain-driven design into practice, and create beautiful applications.
[Devoxx Morocco 2015] Apache Cordova In ActionHazem Saleh
Apache Cordova is a platform for building native mobile apps using common Web technologies (HTML, CSS and JavaScript). Apache Cordova offers a set of APIs that allow the mobile app developers to utilize mobile native functions such as (Audio, Camera, Contacts …etc) using JavaScript. jQuery mobile is one of the best mobile web application frameworks, which allows the web developers to develop neat mobile web applications. This session discusses why there is a need for Hybrid mobile development, the current challenges of mobile development, and how using Apache Cordova can help in overcoming many of these technical challenges. It also highlights the best practices of using Apache Cordova with jQuery mobile. Finally, it demonstrates a real Cordova mobile app for showing the audience the best practices of designing, developing, and deploying hybrid Android and iOS mobile apps.
With third party clients connecting to your service you may find that the assumptions or opinions of a typical rails application are not robust enough. We'll run through some key considerations when building an API that will be consumed by a mobile app.
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...Wim Selles
This presentation is about the things I did to test the Tele2 React Native app with Appium. I'll explain the journey we've taken and some best practices which you can use with React Native and Appium
Create Your Own Framework by Fabien PotencierHimel Nag Rana
This is a combined form of series of articles by Fabien Potencier - the author of Symfony Framework. I have collected and converted them as this ebook for storing and sharing purpose.
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016Codemotion
For developers used to working with frameworks like Spring, and Rails, Go's lack of advice on how to structure your application can be bewildering. Many new developers, reach for their favourite Spring, or Rails equivalent, and rely on its structure, but that is a mistake! Go gives us wonderful tools to put Domain-driven design into practice, and create beautiful applications.
[Devoxx Morocco 2015] Apache Cordova In ActionHazem Saleh
Apache Cordova is a platform for building native mobile apps using common Web technologies (HTML, CSS and JavaScript). Apache Cordova offers a set of APIs that allow the mobile app developers to utilize mobile native functions such as (Audio, Camera, Contacts …etc) using JavaScript. jQuery mobile is one of the best mobile web application frameworks, which allows the web developers to develop neat mobile web applications. This session discusses why there is a need for Hybrid mobile development, the current challenges of mobile development, and how using Apache Cordova can help in overcoming many of these technical challenges. It also highlights the best practices of using Apache Cordova with jQuery mobile. Finally, it demonstrates a real Cordova mobile app for showing the audience the best practices of designing, developing, and deploying hybrid Android and iOS mobile apps.
With third party clients connecting to your service you may find that the assumptions or opinions of a typical rails application are not robust enough. We'll run through some key considerations when building an API that will be consumed by a mobile app.
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...Wim Selles
This presentation is about the things I did to test the Tele2 React Native app with Appium. I'll explain the journey we've taken and some best practices which you can use with React Native and Appium
Create Your Own Framework by Fabien PotencierHimel Nag Rana
This is a combined form of series of articles by Fabien Potencier - the author of Symfony Framework. I have collected and converted them as this ebook for storing and sharing purpose.
As your app code gets larger and more complex, it makes sense to break your project out into smaller reusable components. But what’s the best way to do this? How can you clearly version your internal libraries? What kind of setup and maintenance can you expect? How much could it slow down development time?
In this talk we’ll dive into the various ways you can manage internal library dependencies. We’ll chat about the current state of Android dependency management, Gradle multi-project builds, Git submodules, and creating a private maven repository in Artifactory. The speaker will share real-world examples, and the pros and cons of each approach.
A perspective on iPhone development from a server-side developer with very little GUI background.
Given at http://www.lfpug.com in London on 26 March 2009.
What's New in JHipsterLand - Devoxx Poland 2017Matt Raible
JHipster is an application generator that allows you to create monoliths or microservices, based on Spring Boot and Angular. It leverages Spring Cloud for microservices and contains best-of-breed JavaScript and CSS libraries for creating your UI. In this session, you’ll learn about what’s new in JHipster. Topics include Angular 4, Progressive Web Apps, HTTP/2, JUnit 5 and Spring 5.
Monolith Demo: https://github.com/mraible/jhipster4-demo/blob/master/README.adoc
Microservices Demo: https://developer.okta.com/blog/2017/06/20/develop-microservices-with-jhipster
Ionic is a great tool for building hybrid mobile apps and AngularJS is a great JavaScript framework that plays very nicely with Ionic. In this talk we'll go over the basics of getting started with AngularJS+Ionic. We'll look at some real code from each of the 2 libraries and see what all is involved in building a hybrid mobile application. We will finish our journey with a real-life Ionic app presentation powered by RESTFul services.
Target Audience: People that want to see where to start with AngularJS and how it fits into Ionic. This talk assumes no prior knowledge with either library. If you've built a PhoneGap mobile app but felt lost when adding MVC-style structure or Bootstrap-esque UI components, this is the talk for you.
Assumed Knowledge: Attendees should be comfortable with "modern JavaScript". A basic understanding of classes and objects and variable scopes will be helpful. Some basic prior exposure to PhoneGap/Cordova and a UI-framework such as Bootstrap will also be helpful.
How native is React Native? | React Native vs Native App DevelopmentDevathon
As a popular development framework, React Native helps you to develop near-native mobile apps. Find out all the differences between React Native and Native App Development:
https://devathon.com/blog/how-native-is-react-native-vs-native-app-development/
#reactjs #app #tech #software #developer #Mobile
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14Salesforce Developers
Description:
The Force.com IDE for Eclipse has long been a go-to tool for developing applications on the Salesforce platform. As of the Summer ‘14 release, the source for the plug-in has been published, and a new era of open-source collaboration has begun.
In this session, you will learn about the open-source process and how you can contribute to the project. You will hear about recent changes made to the plugin prior to the open-source release. We will then walk through the process of making a change: creating a branch, modifying the code, communicating with other collaborators, adding the change to the community branch, and submitting a pull request to the main branch.
Key Takeaways:
::Overview of the Force.com plug-in
::Understanding the different versions of the plug-in
::Making changes to the plug-in
::Getting your contributions accepted
::Future of the Force.com IDE
Intended Audience:
::Salesforce Developers who want to participate in improving the tool set
::Salesforce Developers who want to understand the new plugin
Recommended Resources:
https://developer.salesforce.com/en/events/webinars/Open_source_Eclipse_Plugin
Presented at WordCamp Montreal 2014
Do you ever browse the WordPress Plugin Directory and wish you could see your creations up there? Have you ever written code for a personal site or customer and thought that others could benefit from having access to your work? ‘So, you want to be a plugin developer?’ covers numerous aspects of plugin development, including finding an idea for your plugin and securing a space for it in the directory, programming resources and code quality guidelines to make sure your add-on is top-notch, and more business-oriented topics like monetization and promotion. With all of these tips and tools in hand, your next idea could be the next great WordPress plugin.
[JavaLand 2015] Developing JavaScript Mobile Apps Using Apache CordovaHazem Saleh
Apache Cordova is a platform for building mobile applications using common Web technologies (HTML, CSS and JavaScript). Apache Cordova offers a set of APIs that allow the mobile application developers to access mobile native functions such as (Audio, Camera, File, Battery, Contacts ...) using JavaScript. Although there are many JavaScript mobile application frameworks, jQuery mobile is one of the best mobile web application frameworks which allows the web developers to develop neat mobile web apps. This session illustrates how to use Apache Cordova with the combination of jQuery mobile in order to design, develop, and deploy a complete hybrid Android (and iOS) app. The demo app utilizes the device native functions (Audio and Camera) using pure JavaScript.
Exercicios Pilhas (Stacks) - Estruturas de dados e algoritmos com JavaLoiane Groner
Curso de Estrutura de Dados e Algoritmos com Java Completo com Certificado e Fórum para dúvidas: http://loiane.training
Site: http://loiane.training
Blog: http://loiane.com
Facebook: https://www.facebook.com/loianegroner
Github: https://github.com/loiane
Twitter: https://twitter.com/loiane
As your app code gets larger and more complex, it makes sense to break your project out into smaller reusable components. But what’s the best way to do this? How can you clearly version your internal libraries? What kind of setup and maintenance can you expect? How much could it slow down development time?
In this talk we’ll dive into the various ways you can manage internal library dependencies. We’ll chat about the current state of Android dependency management, Gradle multi-project builds, Git submodules, and creating a private maven repository in Artifactory. The speaker will share real-world examples, and the pros and cons of each approach.
A perspective on iPhone development from a server-side developer with very little GUI background.
Given at http://www.lfpug.com in London on 26 March 2009.
What's New in JHipsterLand - Devoxx Poland 2017Matt Raible
JHipster is an application generator that allows you to create monoliths or microservices, based on Spring Boot and Angular. It leverages Spring Cloud for microservices and contains best-of-breed JavaScript and CSS libraries for creating your UI. In this session, you’ll learn about what’s new in JHipster. Topics include Angular 4, Progressive Web Apps, HTTP/2, JUnit 5 and Spring 5.
Monolith Demo: https://github.com/mraible/jhipster4-demo/blob/master/README.adoc
Microservices Demo: https://developer.okta.com/blog/2017/06/20/develop-microservices-with-jhipster
Ionic is a great tool for building hybrid mobile apps and AngularJS is a great JavaScript framework that plays very nicely with Ionic. In this talk we'll go over the basics of getting started with AngularJS+Ionic. We'll look at some real code from each of the 2 libraries and see what all is involved in building a hybrid mobile application. We will finish our journey with a real-life Ionic app presentation powered by RESTFul services.
Target Audience: People that want to see where to start with AngularJS and how it fits into Ionic. This talk assumes no prior knowledge with either library. If you've built a PhoneGap mobile app but felt lost when adding MVC-style structure or Bootstrap-esque UI components, this is the talk for you.
Assumed Knowledge: Attendees should be comfortable with "modern JavaScript". A basic understanding of classes and objects and variable scopes will be helpful. Some basic prior exposure to PhoneGap/Cordova and a UI-framework such as Bootstrap will also be helpful.
How native is React Native? | React Native vs Native App DevelopmentDevathon
As a popular development framework, React Native helps you to develop near-native mobile apps. Find out all the differences between React Native and Native App Development:
https://devathon.com/blog/how-native-is-react-native-vs-native-app-development/
#reactjs #app #tech #software #developer #Mobile
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14Salesforce Developers
Description:
The Force.com IDE for Eclipse has long been a go-to tool for developing applications on the Salesforce platform. As of the Summer ‘14 release, the source for the plug-in has been published, and a new era of open-source collaboration has begun.
In this session, you will learn about the open-source process and how you can contribute to the project. You will hear about recent changes made to the plugin prior to the open-source release. We will then walk through the process of making a change: creating a branch, modifying the code, communicating with other collaborators, adding the change to the community branch, and submitting a pull request to the main branch.
Key Takeaways:
::Overview of the Force.com plug-in
::Understanding the different versions of the plug-in
::Making changes to the plug-in
::Getting your contributions accepted
::Future of the Force.com IDE
Intended Audience:
::Salesforce Developers who want to participate in improving the tool set
::Salesforce Developers who want to understand the new plugin
Recommended Resources:
https://developer.salesforce.com/en/events/webinars/Open_source_Eclipse_Plugin
Presented at WordCamp Montreal 2014
Do you ever browse the WordPress Plugin Directory and wish you could see your creations up there? Have you ever written code for a personal site or customer and thought that others could benefit from having access to your work? ‘So, you want to be a plugin developer?’ covers numerous aspects of plugin development, including finding an idea for your plugin and securing a space for it in the directory, programming resources and code quality guidelines to make sure your add-on is top-notch, and more business-oriented topics like monetization and promotion. With all of these tips and tools in hand, your next idea could be the next great WordPress plugin.
[JavaLand 2015] Developing JavaScript Mobile Apps Using Apache CordovaHazem Saleh
Apache Cordova is a platform for building mobile applications using common Web technologies (HTML, CSS and JavaScript). Apache Cordova offers a set of APIs that allow the mobile application developers to access mobile native functions such as (Audio, Camera, File, Battery, Contacts ...) using JavaScript. Although there are many JavaScript mobile application frameworks, jQuery mobile is one of the best mobile web application frameworks which allows the web developers to develop neat mobile web apps. This session illustrates how to use Apache Cordova with the combination of jQuery mobile in order to design, develop, and deploy a complete hybrid Android (and iOS) app. The demo app utilizes the device native functions (Audio and Camera) using pure JavaScript.
Exercicios Pilhas (Stacks) - Estruturas de dados e algoritmos com JavaLoiane Groner
Curso de Estrutura de Dados e Algoritmos com Java Completo com Certificado e Fórum para dúvidas: http://loiane.training
Site: http://loiane.training
Blog: http://loiane.com
Facebook: https://www.facebook.com/loianegroner
Github: https://github.com/loiane
Twitter: https://twitter.com/loiane
Exercicios Filas (Queues) - Estruturas de dados e algoritmos com JavaLoiane Groner
Curso de Estrutura de Dados e Algoritmos com Java Completo com Certificado e Fórum para dúvidas: http://loiane.training
Site: http://loiane.training
Blog: http://loiane.com
Facebook: https://www.facebook.com/loianegroner
Github: https://github.com/loiane
Twitter: https://twitter.com/loiane
Using the SharePoint Framework as a surface to express yourself through client side solutions is great but at some point in time, you will require that this beauty you built interacts with APIs holding data that lives within the Office 365 environment. In this session, you will learn how to utilize and optimize your calls to SharePoint via its REST APIs, to the Microsoft Graph and to external services that you might find useful to deliver a rich experience in your solution. You will also learn about how to simplify those calls using the Community-Driven library PnP JS Core that aims to save your time (and sanity) by simplifying the access to the SharePoint REST APIs and to the Microsoft Graph. Goodbye URLs, hello intellisense!
Using the SharePoint Framework as a surface to express yourself through client side solutions is great but at some point in time, you will require that this beauty you built interacts with APIs holding data that lives within the Office 365 environment. In this session, you will learn how to utilize and optimize your calls to SharePoint via its REST APIs, to the Microsoft Graph and to external services that you might find useful to deliver a rich experience in your solution. You will also learn about how to simplify those calls using the Community-Driven library PnP JS Core that aims to save your time (and sanity) by simplifying the access to the SharePoint REST APIs and to the Microsoft Graph. Goodbye URLs, hello intellisense!
AI: Mobile Apps That Understands Your Intention When You TypedMarvin Heng
With Microsoft's Cognitive Services - Language Understanding Intelligent Service (LUIS), we can build a smart app. By following this tutorial, you should learn how to create a intelligent cross platform Mobile App that understands what is your intention.
Read more @ www.techconnect.io
By Marvin Heng
Twitter: @hmheng
Blog: www.techconnect.io
GraphQL - when REST API is to less - lessons learnedMarcinStachniuk
We all know the REST architectural style to define a good API for your applications. However, REST has its disadvantages and constraints. That’s why Facebook developed GraphQL as an alternative.
In my talk, I will present you some REST constraints and how GraphQL solves them. I will talk about how we implemented GraphQL in our application and why.
Get to know our successes… and failures from the first row.
SharePoint Conference 2018 - Build an intelligent application by connecting i...Sébastien Levert
In this session, you will learn how to authenticate your users to the Microsoft Graph from a web perspective while enhancing your application by leveraging multiple endpoints (SharePoint, OneDrive & Exchange) available within this phenomenal API.
You will also learn the basics of playing with the data, and then move to more advanced topics including ways to get notified of changes from webhooks, get subset of results using built-in paging mechanisms and finally how to track the ever-changing data that lives in the Microsoft Graph.
European SharePoint Conference 2018 - Build an intelligent application by con...Sébastien Levert
In this session, you will learn how to authenticate your users to the Microsoft Graph from a web perspective while enhancing your application by leveraging multiple endpoints (SharePoint, OneDrive & Exchange) available within this phenomenal API.
You will also learn the basics of playing with the data, and then move to more advanced topics including ways to get notified of changes from webhooks, get subset of results using built-in paging mechanisms and finally how to track the ever-changing data that lives in the Microsoft Graph.
Engage 2023: Taking Domino Apps to the next level by providing a Rest APISerdar Basegmez
Apps to the next level by providing a Rest API
Session De13 from Engage User Group Conference 2023 with Tom Van Aken
"Providing RESTful APIs has become an increasingly common requirement in recent times. Whether you're just starting a new project or looking to level up your existing Notes/Domino application, finding the right approach is the key to success. By giving you some real-world scenario's and examples, this session will arm you with the knowledge and best practices to help you pick the right tools for the right job when it comes to performance, scalability, and security.
We'll also discuss pros and cons of the brand new Domino REST API (Project Keep) and custom development with Java or LotusScript. Don't miss this opportunity to uncover the hidden gems and avoid the pitfalls of integrating external systems with your Domino platform. Join us and be ready to take your platform to new heights!"
(25/April/2023)
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.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
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!
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.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
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.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
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.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
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
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
11. • JSON: JavaScript Object Notation
• É uma forma de trocar dados entre frontend
e backend representados por chave-valor
12. • JSON: JavaScript Object Notation
• É uma forma de trocar dados entre frontend
e backend representados por chave-valor
• Exemplo: var meuObjeto = {nome : ‘Meu
Nome’, idade: 21};
13. • JSON: JavaScript Object Notation
• É uma forma de trocar dados entre frontend
e backend representados por chave-valor
• Exemplo: var meuObjeto = {nome : ‘Meu
Nome’, idade: 21};
• API JSON Java permite pasear, transformar e
consultar objectos JSON
14. • WebSocket: protocolo de aplicação que
fornece comunicação dupla entre 2 pontos
TCP
• API Java fornece funcionalidade através de
annotations
15.
16. • Concurrency: API Java que fornece
funcionalidade de comunicação assíncrona
17. • Concurrency: API Java que fornece
funcionalidade de comunicação assíncrona
• Batch: API Java que fornece funcionalidade de
tarefas batch
19. URL Verbo HTTP Desc
api/contatos GET obtém lista de contatos
api/contatos/:id GET
obtém dados de contato
específico
api/contatos POST cria contato
api/contatos/:id PUT atualiza contato
api/contatos/:id DELETE deleta contato
20.
21.
22.
23.
24.
25. @Entity
@Table(name = "contact")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Contact.findAll", query = "SELECT c FROM Contact c"),
@NamedQuery(name = "Contact.findById", query = "SELECT c FROM Contact c WHERE c.id = :id"),
@NamedQuery(name = "Contact.findByEmail", query = "SELECT c FROM Contact c WHERE c.email = :email"),
@NamedQuery(name = "Contact.findByName", query = "SELECT c FROM Contact c WHERE c.name = :name"),
@NamedQuery(name = "Contact.findByPhone", query = "SELECT c FROM Contact c WHERE c.phone = :phone")})
public class Contact implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id")
private Integer id;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 255)
@Column(name = "email")
private String email;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 255)
@Column(name = "name")
private String name;
//…
}
26. @Stateless
@Path("contact")
public class ContactFacadeREST extends AbstractFacade<Contact> {
@POST
@Override
@Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public void create(Contact entity) {
super.create(entity);
}
@PUT
@Path("{id}")
@Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public void edit(@PathParam("id") Integer id, Contact entity) {
super.edit(entity);
}
@DELETE
@Path("{id}")
public void remove(@PathParam("id") Integer id) {
super.remove(super.find(id));
}
@GET
@Path("{id}")
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public Contact find(@PathParam("id") Integer id) {
return super.find(id);
}
@GET
@Override
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public List<Contact> findAll() {
return super.findAll();
}
}
27.
28.
29.
30.
31. @JsonAutoDetect
@Entity
@Table(name="CONTACT")
public class Contact {
@Id
@GeneratedValue
@Column(name="id")
private int id;
@Column(name="name", nullable=false)
private String name;
@Column(name="phone", nullable=false)
private String phone;
@Column(name="email", nullable=false)
private String email;
}
32. @Repository
public class ContactDAO {
private HibernateTemplate hibernateTemplate;
@Autowired
public void setSessionFactory(SessionFactory sessionFactory) {
hibernateTemplate = new HibernateTemplate(sessionFactory);
}
public List<Contact> getContacts(int start, int limit) {
DetachedCriteria criteria = DetachedCriteria.forClass(Contact.class);
return hibernateTemplate.findByCriteria(criteria, start, limit);
}
public void deleteContact(int id){
Object record = hibernateTemplate.load(Contact.class, id);
hibernateTemplate.delete(record);
}
}
33. @Controller
public class ContactController {
private ContactService contactService;
@RequestMapping(value="/contact/view.action")
public @ResponseBody Map<String,? extends Object> view(@RequestParam int start, @RequestParam int limit) throws Exception {
try{
List<Contact> contacts = contactService.getContactList(start,limit);
int total = contactService.getTotalContacts();
return ExtJSReturn.mapOK(contacts, total);
} catch (Exception e) {
return ExtJSReturn.mapError("Error retrieving Contacts from database.");
}
}
@RequestMapping(value="/contact/create.action")
public @ResponseBody Map<String,? extends Object> create(@RequestBody ContactWrapper data) throws Exception {
try{
List<Contact> contacts = contactService.create(data.getData());
return ExtJSReturn.mapOK(contacts);
} catch (Exception e) {
return ExtJSReturn.mapError("Error trying to create contact.");
}
}
}
91. • SSL
• Unauthorised access (acesso não autorizado)
• Código backend sem validações
• Dados sem criptografia (local e na troca de
dados)
• Mau uso da persistência