mberry1989 / kontent-sample-app-conference-net Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Entering an invalid or unpublished Location or invalid or unpublished Agenda Item in the URL results in an exception instead of a 404.
User is redirected to a friendly 404 page.
Currently, there aren't any conditions in the controllers to check if a Delivery response contains any items. This could be as simple as adding:
if (response.Items.Count == 0)
{
throw new HttpException(404, "Not found");
}
to the controllers, but there may be a better way that could avoid repeating this condition across multiple controllers.
Due to using a pre-made template, there is a lot of unnecessary JS and CSS that can be removed.
The project currently uses Visual Studio's default .Net MVC template. We should make it more attractive.
Use a free, open-source bootstrap template to save time on development (as web design is not the focus of this project).
Creating a CM migration script for the Kentico Kontent Content Types and a small set of Content Items will allow users to create an instance of the project in their own subscriptions.
Leverage: https://docs.kontent.ai/reference/content-management-api-v2
Do not migrate all content items in order to reduce complexity in the copied project.
An alternate script should be available to migrate all Content Types and Content Items in the event a user wants to copy the full project to their own subscription.
Error:
InvalidOperationException: Sequence contains no elements
System.Linq.Enumerable.First(IEnumerable source)
AspNetCore.Views_Speakers_Index.ExecuteAsync() in Index.cshtml
+
<img src="@sp.Photo.First().Url" />
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, bool invokeViewStarts)
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, string contentType, Nullable statusCode)
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, string contentType, Nullable statusCode)
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ExecuteAsync(ActionContext context, ViewResult result)
Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeResultAsync(IActionResult result)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResultFilterAsync<TFilter, TFilterAsync>()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResultExecutedContext context)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.ResultNext<TFilter, TFilterAsync>(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeResultFilters()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext)
Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.Invoke(HttpContext httpContext)
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Speaker listing will load.
This will showcase the responsive image functionality and allow for more modern/effective design down the road.
Use the same approach as in the Kentico Kontent Boilerplate:
https://github.com/Kentico/kontent-boilerplate-net/blob/master/src/content/Kentico.Kontent.Boilerplate/Views/Shared/DisplayTemplates/Article.cshtml
the HostedVideo model was changed to YouTubeVideo in previous commits in order to simplify the project. This results in an unhandled exception in ~View/Agenda/Detail.cshtml.
We should have the sample application available online for preview and presentation purposes.
For that matter, Heroku cloud service sounds like a good solution.
One issue to overcome with this approach is that Heroku does not support .NET/Core by default. This will likely need to be worked around using a third party .NET Core buildpack.
Speaker IDs currently use a custom element to ensure unique IDs are generated for each speaker. This creates additional overhead for anyone trying to setup their own copy of the project.
Remove the Custom Element from the Speaker content type in Kentico Kontent and refactor the MVC application to use codenames instead of the custom Unique ID element.
Anchor element surrounding "session" items has no src attribute.
Redirect to the Agenda Item referenced in the Sessions section.
To improve application resiliency and performance, as well as provide an example of how caching can be done with Kentico Kontent.
Implement webhook cache invalidation as suggested in the Kontent documentation: https://docs.kontent.ai/tutorials/develop-apps/get-content/improving-performance-with-caching#a-invalidating-cache-with-webhooks
We should use the approach taken in the Kontent Boilerplate: https://github.com/Kentico/kontent-boilerplate-net/tree/master/src/content/Kentico.Kontent.Boilerplate
Creating a migration script that imports all Content Types and Content Items from the sample Tech Conference site will allow a user to copy the full project to their own subscription for editing and exploration.
Leverage: https://docs.kontent.ai/reference/content-management-api-v2
Do not migrate all content items in order to reduce complexity in the copied project.
Similar to Issue #5
Currently there is a lot of placeholder content or lack of content that takes away from the sample.
With multiple people working in the repository, this can speed up development time/testing, while also achieving the Kentico DevRel recommended "Definition of Done" for open source projects.
Take inspiration from kontent-ai/sample-app-net#76
We should add AppVeyor to this repository.
Per best practices, any customization of models should happen in partial classes (create wrapper properties for [DisplayFormat] etc.)
Regenerate the models using the [Kontent .NET Model Generator (https://github.com/Kentico/kontent-generators-net) and the "-g" parameter.
When creating Speakers for the conference, there are no protections against editors inputting duplicate SpeakerIDs. If two speakers have the same ID, the application currently pulls whichever speaker appears first in the JSON repsonse.
Implement the Unique Textbox custom element from: https://kentico.github.io/kontent-custom-element-samples/gallery/#unique-textbox to ensure entered text is unique.
It may be worthwhile to extend the custom element to automatically generate IDs instead of having content editors manually enter the ID.
Using the Kentico.Kontent.Management.Helpers package will ensure that we are following best practices.
Implement https://www.nuget.org/packages/Kentico.Kontent.Management.Helpers for edit urls (see the usage here)
Currently no functionality exists to purchase conference tickets or register to attend a conference.
Option 1: Integrate with e-commerce custom elements:
https://docs.kontent.ai/tutorials/develop-apps/integrate/integrating-with-e-commerce-shopify
https://docs.kontent.ai/tutorials/develop-apps/integrate/integrating-with-e-commerce-magento
Option 2: Integrate with HubSpot or build a custom registration form. This option would force us to change "Tickets" to "Registration" in both the front-end application and in Kontent in order to keep sensible naming conventions.
NullReferenceException: Object reference not set to an instance of an object.
kontent_sample_app_conference_net.Controllers.VenueController.Index(string location) in VenueController.cs
21. DeliveryItemListingResponse<Venue> response = await DeliveryClient.GetItemsAsync<Venue>(
lambda_method(Closure , object )
Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable+Awaiter.GetResult()
Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor+TaskOfActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, object controller, object[] arguments)
System.Threading.Tasks.ValueTask.get_Result()
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext)
Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.Invoke(HttpContext httpContext)
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Navigating to Tickets will retain location in the URL (Example: http://domain.com/**Denver**/Agendas).
The "Tickets" controller is empty at the moment, which is causing the problem.
Issue #9 will address the long-term goals of this section of the site.
Adding options for the Preview API will allow content editors to preview their changes in development and will set the groundwork for adding direct editing (https://docs.kontent.ai/tutorials/write-and-collaborate/preview-content/editing-content-directly-from-your-app).
Add Preview API Delivery Options using DI per the wiki page: https://github.com/Kentico/kontent-delivery-sdk-net/wiki/Instantiating-DeliveryClient-with-Configuration-API-and-DI-in-ASP.NET-Core-MVC-apps
Setup Preview links in Kentico Kontent: https://docs.kontent.ai/tutorials/write-and-collaborate/preview-content/configuring-preview-for-content-items
The Preview API Delivery Options should only exist in appsettings.Development.json, not in the production appsettings.json.
Implementing a "Live Updates" functionality falls out of the scope of this project and adds unneeded complexity. Users will likely be able to implement their own notification systems on top of Kontent that fire when webhooks are triggered.
Remove Live Updates property from Home model and view.
Content Types within Kontent referencing "LiveUpdates" also need to be adjusted/removed.
Easier for editors to locate the item when they spot a mistake while looking at the live site.
Add a button to each page on the live site that would take them to that item in the KK's UI.
.NET Core 2.2's end-of-life was on December 23rd, 2019.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.