官术网_书友最值得收藏!

Chapter 3. Posting Messages

You have used Grails scaffolding to create some skeleton pages that manage users and roles. You will now learn the basics of web application development in Grails and implement the first of our user's goals to post messages.

The first user story could go something like this. As a team member, I want to be able to send a message to the rest of my team, so that I can share important information with my teammates.

To accomplish this goal, you are going to implement the following:

  • A page to allow users to post messages
  • A home page to display all messages in a chronological order

You will need to take the following steps to implement the above items:

  • Create a domain class to represent messages
  • Create a controller to handle user actions for messages
  • Create a view to allow users to enter message data
  • Create a controller to handle requests for the home page of the application
  • Create a view for the home page
  • Validate the message data input by the user
  • Use GORM (Grail's Object Relational Mapping) to persist the message
  • Use GORM to retrieve the messages in chronological order
主站蜘蛛池模板: 司法| 台东市| 七台河市| 德兴市| 高唐县| 甘肃省| 安泽县| 梁平县| 阳泉市| 深州市| 宜兴市| 开化县| 武穴市| 石门县| 绥滨县| 红安县| 黑水县| 集安市| 渑池县| 堆龙德庆县| 肃南| 景德镇市| 岑巩县| 龙门县| 新安县| 淳化县| 平阴县| 陇南市| 漳浦县| 繁峙县| 屯门区| 宜都市| 阿尔山市| 迁安市| 汝南县| 南丹县| 太白县| 吐鲁番市| 台中县| 深圳市| 襄城县|