Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upMarketplace servlet initial progress #312
Conversation
| // TODO: eliminate dependency on this DAO in favor of getting this behavior from the service. | ||
| private IMarketplaceRatingDao marketplaceRatingDao; | ||
|
|
||
| @RequestMapping("/marketplace/") |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| // Accessors and mutators below here. | ||
|
|
||
|
|
||
| public IMarketplaceService getMarketplaceService() { |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
apetro
May 1, 2014
Author
Member
Interesting. I'd intended marketplaceService as a JavaBean property and so it reflexively got a getter to go with its setter, but looking around at other @autowired Controllers in uPortal, looks like the pattern is to have setters without accompanying getters. E.g. ActivityController, ChannelListController, EntitiesRESTController. Will drop the un-used getters.
This comment has been minimized.
This comment has been minimized.
| this.marketplaceService = marketplaceService; | ||
| } | ||
|
|
||
| public IPersonManager getPersonManager() { |
This comment has been minimized.
This comment has been minimized.
| </style> | ||
|
|
||
| <div id="${n}"> |
This comment has been minimized.
This comment has been minimized.
timlevett
May 1, 2014
Member
Idea here, we could pull out shared content from the portlet into separate JSPs then utilize jsp:include.
This comment has been minimized.
This comment has been minimized.
apetro
May 1, 2014
Author
Member
Could. Probably requires URLs parameterized so the included JSP gets them right whether invoked in a portlet or servlet context. Backlogged as UP-4089.
| */ | ||
| #${n}marketplace .sorting_asc { | ||
| background: url('/uPortal/media/org/jasig/portal/channels/marketplace/sort_asc.png') no-repeat center right; |
This comment has been minimized.
This comment has been minimized.
timlevett
May 1, 2014
Member
I wonder if we could pull these from rs instead? At a minimum I would suggest adding in a parameter for the context that is available on the JSP.
This comment has been minimized.
This comment has been minimized.
|
|
||
| <spring:htmlEscape defaultHtmlEscape="true" /> | ||
|
|
||
| <spring:htmlEscape defaultHtmlEscape="true" /> |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| <script src="/uPortal/media/skins/common/javascript/uportal/entity-selector.js" type="text/javascript"> </script> | ||
| <script src="/uPortal/media/skins/common/javascript/uportal/up-parameter-editor.js" type="text/javascript"> </script> | ||
| <script src="/uPortal/media/skins/common/javascript/uportal/flyout-nav.js" type="text/javascript"> </script> | ||
| <script src="/uPortal/media/skins/common/javascript/uportal/up-translator.js" type="text/javascript"> </script> |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| * This is the Servlet version of PortletMarketplaceController. | ||
| */ | ||
| @Controller | ||
| @RequestMapping("/marketplace/**") |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
apetro
May 1, 2014
Author
Member
Might well. I think I remember having trouble with it when I was less specific in the @RequestMapping(), but that might have been some other ghost in the machine. Anyway, backlogged in UP-4084.
|
I do appreciate the providing an update for what you are working on but I find it confusing to review. I'm not sure what I should comment on or what I should let pass because it is labeled as half baked. I would rather just review something when it is fully baked. I don't see a problem of having a Jasig/uPortal feature branch, but I'm not sure if we need a PR for said event. Noticed Travis failed due to a metadata.xml malfunction again. Might want to kick it again. |
|
@timlevett thanks for the feedback; backlogged most and addressed a little. I appreciate being able to use this pull request to get early review of changeset as it goes into that Pull Requests have some nice features for providing a place to document at a higher level than individual commit messages what the bigger picture of a changeset is, with screenshots. I rather hope this worked well as a way to articulate what's here so far and what all is already known still needs done on this feature branch. |
Marketplace servlet initial progress
3f0cb6c
into
Jasig:marketplace_servlet_feature
apetro commentedApr 30, 2014
Initial progress towards a Servlet view on Marketplace. Cf. UP-4080 (Marketplace Servlet "epic").
Partial progress
This is an initial proof of concept proposed for merged into a feature branch for collaboration and continued work, not yet proposed for merge to master because it is so very much not baked.
You should not adopt in production this functionality as it is here implemented.
Context and Vision
Where we're really trying to go here:
We're actually shockingly close to being able to deliver an experience like https://one.iu.edu/ as one view on, one way of accessing uPortal. Personally, I (@apetro) don't think a Marketplace is the only way to navigate portal content, but I do think it's one way, and this feature branch is about making that possible in uPortal. This is just the first increment of progress on the
marketplace_servlet_featurebranch. Hang on to your seats, it's going to be a great ride.Features
Marketplace servlet view: responsive!
A Servlet view on Marketplace renders, and it's even responsive.
Categories show
Categories and portlets show, even filtered according to the user's
BROWSEpermission.Marketplace entries render
Complete with screenshots, etc.
At a pretty URL
Marketplace entries are addressed as a path element. Very hipster.
Filtering works
Yay Datatables / JavaScript (but boo the brute force I'm doing to include the necessary dependencies!)
Works even when not logged in
Respects permissions of logged-in-user or of
guestif not logged in. Just works.Implementation thoughts
Arguably this could have been a usage of the
DETACHEDportlet mode on the existing Marketplace portlet instead, butKnown shortcomings and technical debt
This just ain't baked. Proof-of-concept-deep only.
Unmaintainable horrible brute force styling
This changeset takes the brute force approach of providing styling to the servlet JSPs, but doesn't use a CDN or ResourceServer appropriately and doesn't respect skin customizations and basically what it's doing is an unacceptable brute force first pass to prove the concept that these JSPs can work. Backlogged as UP-4081.
Links don't work
(Almost) none of the hyperlinks work in the servlet views, their having been de-featured to get to inital proof-of-concept rendering. That's both navigational links and action links. (Backlogged as UP-4082.
The UI doesn't gracefully degrade to reflect permissions on those links that don't render (as in, it doesn't even try to suppress the favorite/go link if you don't have permission to subscribe the portlet). Backlogged as UP-4083.
Abusing /api namespace
The Servlet view on Marketplace isn't an
/api, but it's at the/apipath since I'm abusing the mvcController that runs the existing/apiJSON APIs. Better would be to invent a/webpath or so for shiny new Servlet views on uPortal stuff.I took a stab at adding a parallel MVC controller to implement
/weband I'm embarrassed to say I couldn't figure it out in an appropriate timebox, so, backlogged as UP-4084.Also, addressing as
/api/marketplace/works, but/api/marketplacedoesn't, and that'll really annoy you when you trip over it! (Also backlogged in UP-4084.Abstraction violations and duplication
While this benefits from some refactoring of Marketplace functionality into a service layer, the Controllers still directly depend on DAOs when really they should be going through the Service layer for that, and refactoring to that architecture will allow further de-duplication of functionality across the servlet and portlet Controllers over this functionality. Backlogged as UP-4085.
No consideration of performance
Still ain't got no caching. :) That's backlogged as UP-4072. In practice if you let a search engine crawl this as is, it would probably beat the heck out of your portal.
Category BROWSE permission not reflected in Marketplace entry view
Marketplace entries don't filter out Categories that the user doesn't have permission to
BROWSE. Backlogged as UP-4086.