Software and systems engineering Paulo Borba Informatics Center Federal University of Pernambuco
[email protected] ◈ twitter.com/pauloborba
Evaluation of the SaaS architecture class
• Only 13 answers! • "Achei que todas as aulas deveriam ser como esta”
• "a parte prática não foi legal" • ''O questionário deveria ser feito no fim da aula”
• "aulas mais completas sobre o conteúdo, é dificil ler todo material antes da aula”
Class structure • Check previous activities • Log into google with your CIn account • Access and answer today’s questions (…) • Discuss class material
• what haven’t you understood? what don’t you agree? what haven’t you liked? what are you missing to perform the project task?
• Hands-on application development
ModelViewController architecture
Controller 1
Controller 2
Controller n
Model 2
Model 1 Views Views 1 1 1
Views Views 1 1 2
Model n Views Views 1 1 n
Template Views
Views: Groovy Server Pages • Templates used to generate the HTML pages shown by the system
• Formed by mixing • HTML elements and attributes • Grails tags (execute commands or generate HTML elements)
• Groovy code
GSPs references controllers, actions,…
using controller defined by the file hierarchy where this code is
and parameters coming from controllers and previous request
Referencing controllers with forms
Controllers receive arguments from requests, manipulate models, and render and pass arguments to views
renders view (in specific directory associated to the controller) with the same name as the action
ModelViewController architecture
Controller 1
Controller 2
Controller n
Model 2
Model 1 Views Views 1 1 1
Views Views 1 1 2
Model n Views Views 1 1 n
Controllers render non default views, sets flash and session, and redirects to another action
Controllers respond to requests in different response formats…
implicit model name for the first argument: residueInstanceList
or request formats
Grails architecture
Models are Groovy classes, with constraints….
and other GORM annotations
Dúvidas? Pergunte! • Dúvidas de onde atirar: mensagem para a lista, post, livro • Dúvidas de como atirar e o que fazer… • problema de instalação: seguir roteiro à risca, ver detalhes de conf. da máquina; msg para a lista; stackoverflow; web
• problema de sintaxe: gramática, manual • erro de execução-problema semântico: copiar msg de erro no google; depurar; manual; msg para lista com todo o contexto, instalação, etc. detalhe para reproduzir o bug
Looking for information http://grails.github.io/grails-doc/2.4.3/
http://stackoverflow.com/questions/ 22601188/grails-controller-rendering-methodrender-vs-respond
instancelist grails
http://grails.github.io/grails-doc/2.4.3/ref/ Controllers/respond.html
https://jira.grails.org/browse/GRAILS-10721
Software and systems engineering Paulo Borba Informatics Center Federal University of Pernambuco
[email protected] ◈ twitter.com/pauloborba