如何跨应用程序共享Windows 8 WinRT Metro风格的库/组件 [英] How to share Windows 8 WinRT Metro style libaries/components across apps

查看:156
本文介绍了如何跨应用程序共享Windows 8 WinRT Metro风格的库/组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Metro文档指出应用程序是自洽的(没有共享的DLL等),所以我只是想知道如何通过创建可重用的组件/库来创建模块化的BIG Metro应用程序。

The Metro documentation states that the applications are self-consistent (no shared DLL’s, etc), So I’m just wondering how you can create a modular, BIG Metro application by creating reusable components/libraries.

考虑到HTML5 / JavaScript Metro应用程序的情况,如果它们中的很多应该包含相同的CSS和JavaScript(考虑jQuery,模板)或WinJS脚本,那么它看起来不太好......我期望从一开始就存在某种形式的库/重用。

Considering the case for HTML5/JavaScript Metro apps, if a lot of them should contain the same CSS and JavaScript (consider jQuery, templates) or WinJS scripts then it doesn't look quite good … I expected some form of libraries/reuse to exist from the start.

硬盘空间现在绝对便宜但我认为应该有一个版本化的库存储库并且依赖项(WinRT组件/库,JavaScript库等)应按需加载(如果尚未提供)。这里不需要轮子发明,只要看看Maven和Ivy是如何做到的......否则会发现我们心爱的jQuery 1.6.4库部署在数十个(如果不是数百个)应用程序中并且已经准备好了。 ..

The HDD space is definitely cheap nowadays but I think that a versioned library repository should be in place and the dependencies (WinRT components/libraries, JavaScript libraries...etc) should be loaded on demand (if not already available). No "wheel invention" here needed, just look how Maven and Ivy is doing it .... otherwise will find out that our beloved jQuery 1.6.4 library is deployed in tens (if not hundreds) of applications and the bloat is ready ...

推荐答案

作为一般规则,每个WinRT / Metro风格的应用程序只能访问内置于Windows或运送的dll在他们的appx包中。没有设施可以发送集中引用的dll。每个想要使用dll /库的应用程序都需要随附的副本。

As a general rule, each WinRT/Metro style application can access only dlls that are built into Windows or are shipped in their appx package. There is no facility to ship centrally referenced dlls. Each application that wants to use a dll/library will need a copy that ships with it.

这篇关于如何跨应用程序共享Windows 8 WinRT Metro风格的库/组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆