Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds primitive events controller #8

Merged
merged 4 commits into from
Oct 7, 2015
Merged

Adds primitive events controller #8

merged 4 commits into from
Oct 7, 2015

Conversation

RickWieman
Copy link
Member

  • Controller currently supports:
    • Viewing all upcoming events
    • Viewing a creation form (added datetimepicker and consequently momentjs dependencies)
    • Storing a created event (without validation though)
  • Adds first three events to landing page (not sure if sorted by starting time 😉)
  • Fixes jsDelivr URLs


// Jsr310JpaConverters.class is necessary for correctly persisting e.g. LocalDateTime objects
@EntityScan(basePackageClasses = {EventsApplication.class, Jsr310JpaConverters.class})
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@praseodym This solved the issue of LocalDateTime.now() not being earlier than the end date of a newly created event 😉

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Apparently Hibernate 5 has native support, but for now this is a fine workaround.

@jgadelange
Copy link
Member

Are the @author comments necessary? I always think it strange when someone has changes in a class that is "authored" by someone else..

@RickWieman
Copy link
Member Author

@praseodym Started with such a tag in the MainController, so I added one to the EventsController as well. I agree it's a bit awkward, if Mark agrees I'll remove all author tags in the codebase.

@praseodym
Copy link
Member

The idea is that it's nice to see who was class' author. You'd have to add your own name when making significant changes. However, Git works fine for figuring this out as well, so feel free to remove them.

@@ -52,6 +52,8 @@ dependencies {
compile("com.zaxxer:HikariCP")

compile("com.google.guava:guava:18.0")
compile 'org.webjars.bower:eonasdan-bootstrap-datetimepicker:4.17.37'
compile 'org.webjars.bower:momentjs:2.10.6'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

net een andere syntax :')

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oeps, het was laat (en ik heb lazy gekopieerd vanaf webjars)

@praseodym
Copy link
Member

In addition to the comments, it would be nice to have:

  • Tests for at least the JSR310 JPA converters,
  • Reduced code duplication with Thymeleaf natural templates (maybe this); I'm fine with doing this in a separate issue though.

Rick Wieman added 3 commits October 7, 2015 10:54
* Controller currently supports:
  - Viewing all events
  - Viewing a creation form
  - Storing a created event
* Adds first three events to landing page
* Fixes jsDelivr URLs
@RickWieman
Copy link
Member Author

Not sure what else to test, moved the duplicate code reduction to #9.

praseodym added a commit that referenced this pull request Oct 7, 2015
Add primitive events controller
@praseodym praseodym merged commit 67f73c9 into master Oct 7, 2015
@praseodym praseodym deleted the events-controller branch October 7, 2015 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants