1 / 28

WebFoundation 2.0 Kurs

WebFoundation 2.0 Kurs. Prepare labb Auto register in Autofac ConfigMapper Smaller Functionality Web events Demo Labb WebFoundation , Wipcore. Innehåll. WebFoundation 2.0 Kurs. Prepare labb. Download WF from: http:// win.wipcore.se/Downloads/Item/WebFoundation-2.0.0.117

raheem
Download Presentation

WebFoundation 2.0 Kurs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. WebFoundation 2.0 Kurs Prepare labb Auto register in Autofac ConfigMapper Smaller Functionality Web events Demo Labb WebFoundation, Wipcore Innehåll

  2. WebFoundation 2.0 Kurs Prepare labb Download WF from:http://win.wipcore.se/Downloads/Item/WebFoundation-2.0.0.117 install VS 2012(Or Installdownload .net4.5, install : MVC 4)

  3. WebFoundation 2.0 Kurs 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 Auto register in Autofac

  4. WebFoundation 2.0 Kurs Auto register in Autofac

  5. WebFoundation 2.0 Kurs 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. http://win.wipcore.se/Library/Index/WebFoundation.Auto.register.in.Autofac Auto register in Autofac

  6. WebFoundation 2.0 Kurs 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. Configmapper

  7. WebFoundation 2.0 Kurs Configmapper

  8. WebFoundation 2.0 Kurs Just write “?” in configuration to get existing properties (sometimes you need to clear the cache with url /debugcache/clear ): Configmapper

  9. WebFoundation 2.0 Kurs Configmapper

  10. WebFoundation 2.0 Kurs Configmapper

  11. WebFoundation 2.0 Kurs http://win.wipcore.se/Library/Index/WebFoundation.ConfigMapper Configmapper

  12. WebFoundation 2.0 Kurs 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.ChangeMonitorsAddEnovaChangeMonitor(product.ID);MemoryCache.Default.Add("testkey", "testValue", policy); Built on: Smaller Functionality

  13. WebFoundation 2.0 Kurs Providers:EnovaContextProviderHttpContextProviderHttpRequestProviderHttpSessionProvider Extensions (using Wipcore.WebFoundation.Base.Extensions):T GetItem<T>(this HttpContextBasehttpContextBase,string key, Func<T> createItem)T GetItem<T>(this HttpSessionStateBasehttpSessionStateBase, string key, Func<T> createItem)T Get<T>(this ObjectCacheobjectCache, string key, Func<T> createValue, DateTimeOffsetabsoluteExpiration, string regionName = null)T Get<T>(this NameValueCollectionappSettings, string key, T defaultValue = default(T))I.e. Smaller Functionality

  14. WebFoundation 2.0 Kurs UpdatedEnovaGenerics: http://win.wipcore.se/Library/Index/Wipcore.eNOVA.Generics Smaller Functionality

  15. WebFoundation 2.0 Kurs Smaller Functionality

  16. WebFoundation 2.0 Kurs 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. IApplicationListenerapplication_start and end error. IRequestListenerRequestBegin, RequestEnd , PreRequestExecute, PostRequestExecutePlease also consider MVC GlobalFilters! ISessionListenerBegin,End You could also set the order to: First, Normal, Last which intentionally is a rough range. Web Events

  17. WebFoundation 2.0 Kurs http://win.wipcore.se/Library/Index/Web.events.for.Web.Foundation Web Events

  18. WebFoundation 2.0 Kurs http://webfoundation.wipcore.se/ 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. http://win.wipcore.se/Library/Index/Wipcore.eNOVA.Remoting.with.IPC Demo

  19. WebFoundation 2.0 Kurs MVC RenderAction: Demo

  20. WebFoundation 2.0 Kurs http://www.webfoundation.se/debugcache/index http://www.webfoundation.se/debugcache/clear Demo

  21. WebFoundation 2.0 Kurs Demo

  22. WebFoundation 2.0 Kurs MVC Miniprofiler Demo

  23. WebFoundation 2.0 Kurs Less,MVC bundle Demo

  24. WebFoundation 2.0 Kurs Xml transformation, SlowSheeta Demo

  25. WebFoundation 2.0 Kurs One click deploy! Demo

  26. WebFoundation 2.0 Kurs Best practice Autofac and override of WF controllers: Demo

  27. WebFoundation 2.0 Kurs Elmah view and mail errors: Demo

  28. WebFoundation 2.0 Kurs Tips Debug Webfoundation: http://enovaleaks.se/2012/12/17/hur-man-debuggar-webfoundation/ 2 branches \tfs\WipcoreWebFoundationDev\tfs\WipcoreWebFoundationRelease\V2.0.0 Don’t miss to read “WebFoundation Release notes.docx” and “WebFoundationinstallation manual.docx” in the zip which explains how to upgrade your WF project. Send suggestions and fixes!!!! Read your homework: http://enovaleaks.se/ Webfoundation, Wipcore

More Related