Coder Social home page Coder Social logo

kentico / mvc Goto Github PK

View Code? Open in Web Editor NEW
87.0 65.0 76.0 9.72 MB

Development of ASP.NET MVC 5 web applications with Kentico 11

Home Page: https://docs.kentico.com/k11/developing-websites/developing-sites-using-asp-net-mvc

License: MIT License

C# 76.39% CSS 7.67% JavaScript 0.71% Pascal 0.04% HTML 5.68% PowerShell 0.12% Less 9.38% ASP.NET 0.01%
mvc kentico aspnet-mvc aspnet-mvc-5

mvc's People

Contributors

alesk-kentico avatar cek-cek avatar davidbkentico avatar kenticopavelv avatar ladislavmargai avatar makma avatar marecekf avatar michalvanzura avatar ondram-kentico avatar ondrejsevcik avatar petrinecp avatar petrsvihlik avatar radkakop avatar rpribyl avatar skurekjakub avatar standasojka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mvc's Issues

Client caching for static content is broken when Preview is enabled

As soon as I enable the Preview module in an MVC site, client cache settings are completely ignored.

To reproduce:

  • Setup an MVC-only Kentico site using the Kentico Nuget packages
  • Setup application initialization as done in sample apps like Dancing Goat (App_Start\Application.cs)
  • Add an entry to the routing table to ignore static content
  • Now request a page and observe the headers on static content like /Content/Styles/Site.css
Cache-Control: private
  • setup client caching in web.config:
<staticContent>
       <clientCache cacheControlCustom="public" cacheControlMaxAge="1.00:00:00" cacheControlMode="UseMaxAge"/>
</staticContent>
  • The response headers should now include this:
Cache-Control: public,max-age=86400

But it doesn't.

  • Now disable the Preview module in App_Start\Application.cs

After that, caching works as expected for static content.

I've traced this back to line 59 in PreviewFeatureModule.cs.

context.Response.Cache.AddValidationCallback(ValidateCacheItem, null);

Commenting that line solves the issue. I'm not sure why that line is even there.
For static content, the event handler being registered is never hit.

Convert from project.json to VS2017 SDK style projects

Motivation

project.json is deprecated and SDK style projects are supported in .NET Standard, .NET Core and .NET Framework projects.

SDK style projects also provide

  • The best Nuget package dependency resolution (the transitive dependency tree can be seen in VS references UI)
  • Easier access to *.csproj files in VS (no need to unload, fewer merge conflicts through file globbing)
  • PackageReference Nuget package manifest syntax (the recommended approach going forward)
  • Global package store for users (faster package restore for common packages)

This could make it easier for developers external to Kentico to contribute to this repository.

Proposed solution

Convert all the .csproj files in this repo to SDK project syntax

Additional context

There are tools to help with this conversion
https://github.com/hvanbakel/CsprojToVs2017
And Nate McMaster blogged about the process
https://natemcmaster.com/blog/2017/03/09/vs2015-to-vs2017-upgrade/

Kentico 12

Kentico 12 sample code for dancing got can i get because earlier version not working in kentico 12

Models aren't easy to extend with custom columns

For example, if a new column is added to the CustomerInfo class (i.e. CustomerTitle) then there is no way of using the Kentico.Ecommerce package to access those new columns and expose them through the Customer model.

It could be useful to amend the models to set the "OriginalCustomer" value to be a protected property which can be access by classes inheriting from Customer. This would allow us to create a custom Customer model which includes our extra columns.

This pattern could be applied to the other models in the various packages.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.