1. 程式人生 > 實用技巧 >釋出:上下文中的ASP.NET和Web工具2012.2

釋出:上下文中的ASP.NET和Web工具2012.2

One ASP.NET Last year the ASP.NET team started talking about something we're calling "One ASP.NET." I showed some mockups of our ideas last summer at the aspConf Keynote that you can watch online. 去年,ASP.NET團隊開始談論我們稱之為“一個ASP.NET”的事情。 去年夏天,我在 aspConf主題演講中展示了 一些有關我們想法的模型 ,您可以線上觀看

We also announced then that we would add new features to ASP.NET as out of band releases (OOB) without breaking existing functionality. This means that developers don't have to wait for the next version of Visual Studio for great web development features today. We're aiming to add to ASP.NET and Web Tools every 6 months.

然後我們還宣佈,我們將在帶外發行版(OOB)中向ASP.NET新增新功能,而不會破壞現有功能。 這意味著開發人員今天不必等待下一版Visual Studio的強大Web開發功能。 我們的目標是每6個月新增一次ASP.NET和Web工具。

For those that don't want to wait, Mads and the team also started a feature playground called Web Essentials. This is an extension to Visual Studio that updates all the time with ideas and brainstorms about how VS can be an even better editor for the web. As features "graduate" from Web Essentials, they move into ASP.NET and Web Tools proper. A bunch of features graduate with today's release.

對於那些不想等待的人,Mads和團隊還建立了一個名為Web Essentials的功能遊樂場。 這是Visual Studio的擴充套件,可以隨時更新關於VS如何成為Web更好的編輯器的想法和頭腦風暴。 作為來自Web Essentials的“畢業生”功能,他們可以使用ASP.NET和Web工具。 今天釋出的功能有很多。

Today we announced ASP.NET and Web Tools 2012.2. You can use the Web Platform Installer to get ASP.NET and Web Tools 2012.2 now.

今天,我們宣佈了ASP.NET和Web Tools 2012.2

。 您可以使用Web平臺安裝程式立即獲取ASP.NET和Web工具2012.2

Get it with the Online Installer:

通過線上安裝程式獲取它

Get ASP.NET and Web Tools 2012.2 with Web Platform Installer

使用Web平臺安裝程式獲取ASP.NET和Web Tools 2012.2

OR use the Offline Installers:

或使用離線安裝程式:

1. Get the ASP.NET 2012.2 pieces then get one of these

1。 獲得ASP.NET 2012.2,然後獲得其中之一

2. Web Tools 2012.2 for any regular Visual Studio 2012 or Web Tools 2012.2 for Visual Studio Web Express

2.適用於任何常規Visual Studio 2012的Web工具2012.2適用於Visual Studio Web Express的Web工具2012.2

Here's some highlights:

這裡有一些亮點:

編者 (Editors)

Syntax Highlighting for client side templating languages within the HTML editor like:

HTML編輯器中客戶端模板語言的語法突出顯示,例如:

  • CoffeeScript

    CoffeeScript
  • Mustache

    鬍子
  • Handlebars

    車把
  • JsRender

    渲染器

Other editors get new features as well:

其他編輯器也具有新功能:

  • Syntax Highlighting, intellisense and validation for LESS files.

    LESS檔案的語法突出顯示,智慧感知和驗證。
  • Intellisense for Knockout.js bindings!

    用於Knockout.js繫結的Intellisense!
  • CSS Auto Sync - type into the CSS editor while the site running and get live updates in Page Inspector

    CSS自動同步-在網站執行時輸入CSS編輯器,並在Page Inspector中獲取實時更新
  • Everyone's favorite "Paste JSON as Class." Copy some JSON into the clipboard, paste and get either C# or VB classes for your JSON to serialize into.

    每個人都喜歡的“將JSON貼上為類”。 將一些JSON複製到剪貼簿中,貼上並獲取C#或VB類以供JSON序列化。

瀏覽器 (Browsers)

Mobile Emulator support adds extensibility hooks so that third-party emulators and unusual browsers can be installed as a VSIX. The installed emulators will show up in the F5 dropdown, so that developers can preview their websites on a variety of devices. Read more about this feature in my entry on the new BrowserStack integration with Visual Studio.

對移動模擬器的支援增加了可擴充套件性掛鉤,以便可以將第三方模擬器和不尋常的瀏覽器作為VSIX安裝。 已安裝的模擬器將顯示在F5下拉列表中,以便開發人員可以在各種裝置上預覽其網站。 在我與Visual Studio的新BrowserStack整合中的文章中瞭解有關此功能的更多資訊。

配套 (Packages)

With today’s release, all of the ASP.NET templates have updated versions of jQuery, jQuery UI, jQuery Validation, Modernizr, Knockout, and other open source NuGet packages. Your existing projects won't update unless you update them explicitly.

在今天的發行版中,所有ASP.NET模板均具有jQuery,jQuery UI,jQuery驗證,Modernizr,Knockout和其他開源NuGet軟體包的更新版本。 除非您明確地更新現有專案,否則它們不會更新。

ASP.NET (ASP.NET)

  • OData support in ASP.NET Web API

    ASP.NET Web API中的OData支援
  • SignalR included out of the box and fully supported

    SignalR開箱即用且完全受支援
  • Web Forms now supports Friendly URLs (no more .aspx extension)

    Web窗體現在支援友好URL(沒有更多的.aspx副檔名)
  • Web Forms supports device (mobile) specific pages, so product.aspx can also have product.mobile.aspx.

    Web窗體支援特定於裝置(移動)的頁面,因此product.aspx也可以具有product.mobile.aspx。
  • Updated Single Page Application template

    更新的單頁應用程式模板
  • MVC Facebook Application Template

    MVC Facebook應用程式模板
  • Web Sites get the same publishing tools as Web Projects

    網站獲得與Web專案相同的釋出工具

These are just the highlights. But let me call out one specific feature that gets us closer to one of the main goals for One ASP.NET which is what I call a more level playing field.

這些只是亮點。 但是,讓我指出一個特定功能,使我們更接近One ASP.NET的主要目標之一,這就是我所說的更公平的競爭環境。

社群專案模板 (Community Project Templates)

One of the most significant "under the hood" changes is the ability to add a project template via a VSIX.

最重要的“內幕”更改之一是能夠通過VSIX新增專案模板的功能。

We'll be seeing an update to the Visual Studio Gallery soon that will make it so you can upload your own VSIX files (Visual Studio Extensions) that can be installed (and easily updated) into the ASP.NET MVC File New Project dialog with one click.

我們將很快看到對Visual Studio Gallery的更新,因此您可以將自己的VSIX檔案(Visual Studio擴充套件)上傳到ASP.NET MVC File New Project對話方塊中,該檔案可以安裝(並輕鬆更新)。一鍵。

It's important to know that we're only halfway there. This is likely not what the final unified One ASP.NET dialog will end up looking like, but it's a start as it's a good place to open up for new templates.

重要的是要知道我們才剛剛到一半。 最終的統一ASP.NET對話方塊可能看起來不是這樣,但這是一個開始,因為它是開啟新模板的好地方。

Phrased differently, project templates should be as easy to share as NuGet packages. That's a goal.

措辭不同,專案模板應該與NuGet包一樣容易共享。 這是一個目標。

Another goal is to be able to take an example project that looks the way you want, with the NuGet packages setup as you like them, then "Save As | Project Template" then publish the resulting template/VSIX to the gallery. That means projects like NancyFX, or FubuMvc or whatever you can think of can live next to out of the box templates.

另一個目標是能夠以自己喜歡的方式建立一個示例專案,並根據需要設定NuGet軟體包,然後“另存為|專案模板”,然後將生成的模板/ VSIX釋出到相簿中。 這意味著像NancyFX或FubuMvc之類的專案或任何您能想到的專案都可以直接使用現成的模板。

Here's the initial documentation on how you can create VSIXs of project templates, get in this dialog and make it easy to spread your vision of a great web app. We are working to make this process fewer steps and unify things, but this works great now with VS2012.2 so you can get started today. Stay tuned for more on this.

這裡的初始文件如何建立的專案模板VSIXs,在此對話方塊中獲取並可以很容易地傳播你的一個偉大的web應用程式的願景。 我們正在努力使此過程更少的步驟並統一起來,但是現在與VS2012.2一起使用時效果很好,因此您可以立即開始使用。 敬請期待更多。

In the near future we'd like to see the community sharing project templates that look the way the community wants them to look, living side by side with templates from Microsoft.

在不久的將來,我們希望看到社群共享專案模板,這些模板看起來像社群希望它們看起來的樣子,與Microsoft模板並存。

The fully populated ASP.NET MVC 4 New Project dialog has many new templates

As start, we're announcing four Single Page Application (SPA) templates you can install now. Please note that these community templates could be anything, the VSIX hooks are wide open, it's just that the first few happen to be SPA templates.

首先,我們宣佈您現在可以安裝四個單頁應用程式(SPA)模板。 請注意,這些社群模板可以是任何東西,VSIX鉤子是敞開的,只是前幾個恰好是SPA模板。

And, a clever play on words from John Papa (because what do you get in a SPA?)

而且,巧妙地演奏了約翰·帕帕(John Papa)的話(因為您從SPA中獲得了什麼?)

  • HotTowel - a more complex template that includes knockout, bootstrap, sammy, toastr, q, momentjs, breeze and puts them all together into one SPA example.

    HotTowel-一種更復雜的模板,其中包括敲除,載入程式,sammy,toastr,q,momentjs,微風,並將它們全部組合為一個SPA示例。

Note how nice the HTML editor looks when working on an Ember project, for example. We've got syntax highlighting, HTML5 Intellisense and coloring in our Mustache templates.

請注意,例如,在處理Ember專案時HTML編輯器的外觀如何。 我們的Mustache模板中有語法突出顯示,HTML5 Intellisense和著色。

Mustache template syntax highlighting

Remember, you'll need the 2012.2 release to see these new templates, so use Web Platform Installer to get ASP.NET and Web Tools 2012.2 now. And, if you want check out our future playground features like Zen Coding, CoffeeScript and lots more, also pick up Web Essentials. Note that Web Essentials is a small extension and if it causes you any trouble you can just disable it.

請記住,您需要2012.2版才能看到這些新模板,因此,請立即使用Web Platform Installer來獲取ASP.NET和Web Tools 2012.2 。 而且,如果您想檢視我們將來的遊樂場功能(例如Zen Coding ,CoffeeScript等),還可以使用Web Essentials 。 請注意,Web Essentials是一個小的擴充套件,如果給您帶來麻煩,則可以將其禁用。

您是否應該擔心此版本? (Should you fear this release? )

ASP.NET and Web Tools 2012.2 doesn't change any GAC'ed (Global Assembly Cache) files. It won't mess up your install of ASP.NET or change any existing projects. It's changes are either tooling within Visual Studio, or additions and improvements via local NuGet packages.

ASP.NET和Web工具2012.2不會更改任何GAC(全域性程式集快取)檔案。 它不會弄亂您的ASP.NET安裝或更改任何現有專案。 它的更改要麼是Visual Studio中的工具,要麼是通過本地NuGet包進行的附加和改進。

Go get it. ASP.NET and Web Tools 2012.2

去實現它(夢想);去得到它(東西。 ASP.NET和Web工具2012.2

關於斯科特 (About Scott)

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

斯科特·漢塞爾曼(Scott Hanselman)是前教授,前金融首席架構師,現在是演講者,顧問,父親,糖尿病患者和Microsoft員工。 他是一位失敗的單口相聲漫畫家,一個玉米種植者和一本書的作者。

facebook twitter subscribe About 關於 Newsletter 時事通訊 Hosting By 主持人 Hosted in an Azure App Service

翻譯自: https://www.hanselman.com/blog/released-aspnet-and-web-tools-20122-in-context