Presentation is loading. Please wait.

Presentation is loading. Please wait.

 Prepare labb  Auto register in Autofac  ConfigMapper  Smaller Functionality  Web events  Demo  Labb  WebFoundation, Wipcore WEBFOUNDATION 2.0.

Similar presentations


Presentation on theme: " Prepare labb  Auto register in Autofac  ConfigMapper  Smaller Functionality  Web events  Demo  Labb  WebFoundation, Wipcore WEBFOUNDATION 2.0."— Presentation transcript:

1  Prepare labb  Auto register in Autofac  ConfigMapper  Smaller Functionality  Web events  Demo  Labb  WebFoundation, Wipcore WEBFOUNDATION 2.0 KURS INNEHÅLL

2 WEBFOUNDATION 2.0 KURS PREPARE LABB  Download WF from:  install VS 2012 (Or Install download.net 4.5, install : MVC 4 )download.net 4.5MVC 4

3  Speed up your development with Auto register in Autofac. No need to know and write Autofac register code anymore, just follow naming convention of classes. If you find something to customize in Webfoundation just inherit interface or class and override functionality.  [AutoRegisterAsSingleInstance], "Service", "Repository", "Provider", "Listener", "Factory“  [AutoRegisterAsInstancePerDependency], "Model", "Mapper", "Filter", "ViewData””  WebFoundation.AutoRegister.ExceptTypes WEBFOUNDATION 2.0 KURS AUTO REGISTER IN AUTOFAC

4 WEBFOUNDATION 2.0 KURS AUTO REGISTER IN AUTOFAC

5  DependencyResolver.Current.GetService<>()  Func <> to create x number of classes from another class (you could also use in-argument).  IEnumerable <> to get all the classes that are registered with an interface.  utofac utofac WEBFOUNDATION 2.0 KURS AUTO REGISTER IN AUTOFAC

6  A new alternative to the Factory layer in Webfoundation called ConfigMapper. The purpose of this layer is to get data from Enova, transform (cache) it so it can be displayed. By configuration in xml file (or backoffice) you specify what to map from Enova to the site. The goal is to improve developer speed, Site speed and flexibility. WEBFOUNDATION 2.0 KURS CONFIGMAPPER

7 WEBFOUNDATION 2.0 KURS CONFIGMAPPER

8 Just write “?” in configuration to get existing properties (sometimes you need to clear the cache with url /debugcache/clear ): WEBFOUNDATION 2.0 KURS CONFIGMAPPER

9 WEBFOUNDATION 2.0 KURS CONFIGMAPPER

10 WEBFOUNDATION 2.0 KURS CONFIGMAPPER

11  WEBFOUNDATION 2.0 KURS CONFIGMAPPER

12  A new Enova dependency cache wich will cache as long the object is not changed in Enova. Only supported when Enova is started in process. This might result in that changes in backoffice will not affect a web started in remote mode. var policy = new CacheItemPolicy(); policy.ChangeMonitors AddEnovaChangeMonitor(product.ID); MemoryCache.Default.Add("testkey", "testValue", policy);  Built on: WEBFOUNDATION 2.0 KURS SMALLER FUNCTIONALITY

13  Providers: EnovaContextProvider HttpContextProvider HttpRequestProvider HttpSessionProvider  Extensions (using Wipcore.WebFoundation.Base.Extensions): T GetItem (this HttpContextBase httpContextBase,string key, Func createItem) T GetItem (this HttpSessionStateBase httpSessionStateBase, string key, Func createItem) T Get (this ObjectCache objectCache, string key, Func createValue, DateTimeOffset absoluteExpiration, string regionName = null) T Get (this NameValueCollection appSettings, string key, T defaultValue = default(T)) I.e. WEBFOUNDATION 2.0 KURS SMALLER FUNCTIONALITY

14  Updated Enova Generics: WEBFOUNDATION 2.0 KURS SMALLER FUNCTIONALITY

15 WEBFOUNDATION 2.0 KURS SMALLER FUNCTIONALITY

16  ATimerListener makes it possible to schedule events on the web. This might be good if you want to make less complex things without creating integration. If it is not finished on time, it skips to the next opportunity.  AControllerTimerListener makes it possible to schedule an MVC controller on the web, i.e. for caching a page.  IApplicationListener application_start and end error.  IRequestListener RequestBegin, RequestEnd, PreRequestExecute, PostRequestExecute Please also consider MVC GlobalFilters!  ISessionListener Begin,End  You could also set the order to: First, Normal, Last which intentionally is a rough range. WEBFOUNDATION 2.0 KURS WEB EVENTS

17  WEBFOUNDATION 2.0 KURS WEB EVENTS

18   Check My.Web for best practice!!! i.e.  Nuget for references (js in script folder)  Enova CMS Template MyPage.cs, just follow instructions to create a new Page type.  Build event for update portable bs.  WEBFOUNDATION 2.0 KURS DEMO

19  MVC RenderAction:  WEBFOUNDATION 2.0 KURS DEMO

20   WEBFOUNDATION 2.0 KURS DEMO

21 WEBFOUNDATION 2.0 KURS DEMO

22  MVC Miniprofiler WEBFOUNDATION 2.0 KURS DEMO

23  Less,MVC bundle  WEBFOUNDATION 2.0 KURS DEMO

24  Xml transformation, SlowSheeta  WEBFOUNDATION 2.0 KURS DEMO

25  One click deploy!  WEBFOUNDATION 2.0 KURS DEMO

26  Best practice Autofac and override of WF controllers:  WEBFOUNDATION 2.0 KURS DEMO

27  Elmah view and mail errors:  WEBFOUNDATION 2.0 KURS DEMO

28  Tips Debug Webfoundation:  2 branches \tfs\WipcoreWebFoundationDev \tfs\WipcoreWebFoundationRelease\V2.0.0  Don’t miss to read “WebFoundation Release notes.docx” and “WebFoundation installation manual.docx” in the zip which explains how to upgrade your WF project.  Send suggestions and fixes!!!!  Read your homework:  WEBFOUNDATION 2.0 KURS WEBFOUNDATION, WIPCORE


Download ppt " Prepare labb  Auto register in Autofac  ConfigMapper  Smaller Functionality  Web events  Demo  Labb  WebFoundation, Wipcore WEBFOUNDATION 2.0."

Similar presentations


Ads by Google