当前位置: 首页 > news >正文

报名网站怎么做网站建设的功能需求分析策划书

报名网站怎么做,网站建设的功能需求分析策划书,wordpress公网ip访问,长沙公司做网站的价格每个人都听说过将单个Web应用程序组合成一个大型应用程序的门户。 门户软件的工作原理类似于mashup #xff0d;来自多个来源的内容在单个服务中被拾取#xff0c;大部分显示在单个网页中。 门户软件还允许在嵌入到门户软件中的所有单个Web应用程序#xff08;独立模块… 每个人都听说过将单个Web应用程序组合成一个大型应用程序的门户。 门户软件的工作原理类似于mashup 来自多个来源的内容在单个服务中被拾取大部分显示在单个网页中。 门户软件还允许在嵌入到门户软件中的所有单个Web应用程序独立模块之间更改用户设置例如语言或主题。 此外预计将实现单点登录SSO它也应能正常工作。 这意味着一次登录即可使用户访问所有嵌入式Web应用程序。 知道在JEE世界中是否有一个简单而轻巧的解决方案来开发模块化JSF 2应用程序以自动将其收集并呈现在一个类似门户的Web应用程序中将是很有趣的。 当然有OSGi和复杂的Portals Bridge为JSR-168或JSR-286兼容的Portlet开发提供支持。 但是幸运的是JSF 2已经为“幕后”提供了一种简单的可能性。 我们可以用更少的精力来构建类似于门户的软件。 我们需要的只是JSF 2和CDI – Java世界中事实上的标准DI框架。 这篇文章的主题不是新的。 您可以在网上找到一些讨论和想法。 我只在这里提到两个链接。 第一个是ocpsoft博客中的文章“操作方法具有CDI和PrettyFaces的模块化Java EE应用程序” 。 第二个“使用JSF2的模块化Web应用程序”在JBoss的Wiki中进行了介绍。 这个想法是创建包含单个Web应用程序的JAR文件并为其提供主要的WAR文件。 WAR文件在构建过程中例如通过Maven依赖项将JAR捆绑在一起。 这意味着JAR位于WAR中的WEB-INF / lib /下。 JAR中的XHTML文件放置在/ META-INF / resources /下并且将由JSF 2自动获取。JSF可以使用它们就像它们在/ webapp / resources /文件夹中一样。 例如您可以使用非常常见的uiinclude来包含JAR中的facelets。 这就像一个魅力。 为了能够在运行时获取有关每个JSF模块的一般信息我们还需要JARs文件中的空CDI的beans.xml。 它们通常位于 META-INF文件夹。 现在让我们开始编码。 但是首先让我们定义项目的结构。 您可以在GitHub上找到完整的实现示例 。 这只是使用演示Web应用程序用JSF 2.2编写的类似于JSF 2门户的轻量级实现的概念证明。 有5个子项目 jsftoolkit-jar基本框架为模块化JSF应用程序提供接口和实用程序。 modA-jar第一个Web应用程序模块A它依赖于jsftoolkit-jar。 modB-jar依赖jsftoolkit-jar的第二个Web应用程序模块B。 portal-jar Java类似于门户的软件的一部分。 它还取决于jsftoolkit-jar。 portal-war类门户软件的Web部分。 它汇总了所有文物并且是可部署的WAR。 基本框架jsftoolkit-jar具有应由每个单个模块实现的接口。 最重要的是 /*** Interface for modular JSF applications. This interface should be implemented by every module (JSF app.)* to allow a seamless integration into a portal software.*/ public interface ModuleDescription {/*** Provides a human readable name of the module.** return String name of the module*/String getName();/*** Provides a description of the module.** return String description*/String getDescription();/*** Provides a module specific prefix. This is a folder below the context where all web pages and* resources are located.** return String prefix*/String getPrefix();/*** Provides a name for a logo image, e.g. images/logo.png (used in h:graphicImage).** return String logo name*/String getLogoName();/*** Provides a start (home) URL to be navigated for the module.** return String URL*/String getUrl(); }/*** Any JSF app. implementing this interface can participate in an unified message handling* when all keys and messages are merged to a map and available via msgs EL, e.g. as #{msgs[mykey]}.*/ public interface MessagesProvider {/*** Returns all mesages (key, text) to the module this interface is implemented for.** param locale current Locale or null* return Map with message keys and message text.*/MapString, String getMessages(Locale locale); } 模块A的可能实现如下所示 /*** Module specific implementation of the {link ModuleDescription}.*/ ApplicationScoped Named public class ModADescription implements ModuleDescription, Serializable {Injectprivate MessagesProxy msgs;Overridepublic String getName() {return msgs.get(a.modName);}Overridepublic String getDescription() {return msgs.get(a.modDesc);}Overridepublic String getPrefix() {return moda;}Overridepublic String getLogoName() {return images/logo.png;}Overridepublic String getUrl() {return /moda/views/hello.jsf;} }/*** Module specific implementation of the {link MessagesProvider}.*/ ApplicationScoped Named public class ModAMessages implements MessagesProvider, Serializable {Overridepublic MapString, String getMessages(Locale locale) {return MessageUtils.getMessages(locale, modA);} } 该模块的前缀是moda。 这意味着网页和资源位于文件夹META-INF / resources / moda /下。 这样可以避免所有单个Web应用程序之间的路径冲突相同路径。 实用程序类MessageUtils来自jsftoolkit-jar不在此处公开。 我将只显示MessagesProxy类。 MessagesProxy类是一个应用程序范围的Bean可访问模块化JSF Web应用程序中的所有可用消息。 由于它实现了Map接口因此可以在Java和XHTML中使用。 CDI在运行时会自动注入MessagesProvider接口的所有可用实现。 我们使用Instance MessagesProvider。 ApplicationScoped Named(value msgs) public class MessagesProxy implements MapString, String, Serializable {Injectprivate UserSettingsData userSettingsData;AnyInjectprivate InstanceMessagesProvider messagesProviders;/** all cached locale specific messages */private MapLocale, MapString, String msgs new ConcurrentHashMapLocale, MapString, String();Overridepublic String get(Object key) {if (key null) {return null;}Locale locale userSettingsData.getLocale();MapString, String messages msgs.get(locale);if (messages null) {// no messages to current locale are available yetmessages new HashMapString, String();msgs.put(locale, messages);// load messages from JSF impl. firstmessages.putAll(MessageUtils.getMessages(locale, MessageUtils.FACES_MESSAGES));// load messages from providers in JARsfor (MessagesProvider messagesProvider : messagesProviders) {messages.putAll(messagesProvider.getMessages(locale));}}return messages.get(key);}public String getText(String key) {return this.get(key);}public String getText(String key, Object... params) {String text this.get(key);if ((text ! null) (params ! null)) {text MessageFormat.format(text, params);}return text;}public FacesMessage getMessage(FacesMessage.Severity severity, String key, Object... params) {String summary this.get(key);String detail this.get(key _detail);if ((summary ! null) (params ! null)) {summary MessageFormat.format(summary, params);}if ((detail ! null) (params ! null)) {detail MessageFormat.format(detail, params);}if (summary ! null) {return new FacesMessage(severity, summary, ((detail ! null) ? detail : StringUtils.EMPTY));}return new FacesMessage(severity, ??? key ???, ((detail ! null) ? detail : StringUtils.EMPTY));}/// java.util.Map interface/public int size() {throw new UnsupportedOperationException();}// other methods ... } 好。 但是在何处获取ModuleDescription的实例 逻辑位于门户jar中。 我对CDI实例使用相同的机制。 CDI将为我们找到ModuleDescription的所有可用实现。 /*** Collects all available JSF modules.*/ ApplicationScoped Named public class PortalModulesFinder implements ModulesFinder {AnyInjectprivate InstanceModuleDescription moduleDescriptions;Injectprivate MessagesProxy msgs;private ListFluidGridItem modules;Overridepublic ListFluidGridItem getModules() {if (modules ! null) {return modules;}modules new ArrayListFluidGridItem();for (ModuleDescription moduleDescription : moduleDescriptions) {modules.add(new FluidGridItem(moduleDescription));}// sort modules by names alphabeticallyCollections.sort(modules, ModuleDescriptionComparator.getInstance());return modules;} } 现在我们可以在UI中创建动态图块这些图块表示相应Web模块的入口点。 pe:fluidGrid idfluidGrid value#{portalModulesFinder.modules} varmodDescfitWidthtrue hasImagestruepe:fluidGridItem styleClassui-widget-headerh:panelGrid columns2 styleClassmodGridEntry columnClassesmodLogo,modTxtp:commandLink processthis action#{navigationContext.goToPortlet(modDesc)}h:graphicImage library#{modDesc.prefix} name#{modDesc.logoName}//p:commandLinkh:panelGroupp:commandLink processthis action#{navigationContext.goToPortlet(modDesc)}h:outputText value#{modDesc.name} styleClasslinkToPortlet//p:commandLinkp/h:outputText value#{modDesc.description}//h:panelGroup/h:panelGrid/pe:fluidGridItem /pe:fluidGrid 磁贴是由PrimeFaces Extensions中的 pefluidGrid组件创建的。 它们具有响应能力这意味着它们在调整浏览器窗口大小时会重新排列。 下图演示了启动后门户网站应用程序的外观。 它显示了在类路径中找到的两个模块化演示应用程序。 每个模块化Web应用程序都显示为包含徽标名称和简短描述的图块。 徽标和名称是可单击的。 单击将重定向到相应的单个Web应用程序。 如您所见您可以在门户的主页上切换当前语言和主题。 第二张图片显示了如果用户单击模块A会发生什么。显示了模块A的Web应用程序。 您可以看到“返回门户”按钮因此可以向后导航到门户的主页。 最后有两个注释 可以将每个模块作为独立的Web应用程序运行。 我们可以在运行时再次通过CDI方式检查模块是否在“门户”之内并使用不同的主模板。 这里有一个提示。 我没有实现登录屏幕但是单点登录没有问题因为我们只有一个大型应用程序一个WAR。 一切都在那里交付。 参考 在我们的JCG合作伙伴 Oleg Varaksin的Spring MVC中 使用了多个属性文件这些文件来自软件开发博客Thoughts 。 翻译自: https://www.javacodegeeks.com/2013/12/using-more-than-one-property-file-in-spring-mvc.html
http://www.yutouwan.com/news/80096/

相关文章:

  • 网站从新建设影响收录么男的和女的做那种事情网站
  • 佛山市门户网站建设公司京东网上商城官网下载
  • 景区网站建设的重要性wordpress控件图标
  • 自适应网站模板公司网址查询域名
  • 盐城北京网站建设新品发布会主题大全
  • 网站怎么做充值系统下载wordpress页面布局
  • 帝国网站免费模板品牌网站部门建设方案
  • 潍坊手机网站建设公司深圳网站建设方案外包
  • 文章类网站源码手机网页版登录入口
  • 湖南网站推广建设公司北京专业seo
  • 2019年建设什么网站好给wordpress公告
  • 莆田网站建设建站系统网页界面图
  • 一级做c爱片的网站新东方考研培训机构官网
  • 天津河东区网站建设wordpress同步发帖
  • 宁夏城乡和住房建设厅网站wordpress 如wp_query
  • 莱芜做网站优化网站推广怎么样
  • 秦皇岛做网站外包电子商务主要是什么
  • 本地集团网站建设做网站的公司那家好。
  • 如何用自己公司网站做邮箱国投集团网站开发
  • 怎样做号网站优化哪个网站可以免费学编程
  • 漳州建设网站wordpress pdf预览
  • 网站建设需求说明书怎么写银川360推广 网站建设
  • asp.net做网站吗虚拟主机购买网站
  • 学网站建设 去那里文登区住房和城乡建设局网站
  • dw可以做有后台的网站么用ps给旅游网站做前端网页
  • 我想做网站怎么做企业官网定制
  • 网站建设下载模板之后怎么修改wordpress分类页面不显示内容
  • 东莞网站关键字郑州铭功路网站建设
  • 网站的手机客户端怎样做python手机版
  • 途牛旅游网站建设目的网站建设使用的基本技术