`
canonical
  • 浏览: 368278 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Why Use Meta

阅读更多
   元数据(meta)是描述数据的数据。它所描述的有一部分是数据本身的特性,如字段的长度,精度等,另外一部分描述的则是我们使用这些数据的可行方式和目的等。使用meta可以在程序中更加清楚的表达出我们的意图。例如现在需要在界面上显示一个列表,我们的意图未必是要在界面上显示指定的字段A, 字段B,字段C对应的列,而是"显示那些应该显示在列表中的字段"。这一看似同义反复的表述,如果采用元数据表达,则成为 <ui:PageTable fields="${dsMeta.listableFields}" />。通过使用元数据,我们可以做到系统中众多的功能可以共用实现,即通过同一个页面应用不同的meta则得到不同的最终展现,而后台一个通用的DaoWebAction通过使用meta可以完成对所有实体的操作。这也可以看作是一种复杂的策略模式的应用。
分享到:
评论

相关推荐

    Why Python is Slow: Looking Under the Hood

    Why Python is Slow: Looking Under the Hood # Why Python is Slow Python is slower than Fortran and C for a variety of reasons # Python meta-hacking: Don't...# Just for fun: a few "never use these" hacks

    Google C++ Style Guide_英文版.pdf

    - **Template Meta-programming:** Use templates for compile-time calculations and generic programming. - **Boost:** Use Boost libraries when they provide a more efficient solution than implementing ...

    Intermediate Perl.pdf

    [*] Don't ask why it isn't called that. We must have had 300 emails on the subject. Okay, ask, since we know you're going to anyway. You never really stop learning Perl, so Learning More Perl doesn'...

    Pro Python 2nd edition 英文pdf

    This book is for intermediate to advanced Python programmers who are looking to understand how and why Python works the way it does and how they can take their code to the next level. Table of ...

    JavaScript in 10 Minutes

    3. **Recursive Meta-classes**: Explores the use of meta-programming techniques to create classes dynamically and recursively. 4. **Tail Calls**: Discusses tail recursion optimization, which can ...

    Learn.Search.Engine.Optimization.With.Smart.Internet.Marketing.Strategies 2018

    SEO 2018 is now updated covering the latest changes to Google's algorithm, and walks you through major updates and how to use them to your advantage. This book also reveals industry secrets about ...

    HTML5.Quick.Markup.Reference

    covering the new media tags and file formats that are best for use with HTML5, as well as key factors regarding the data footprint optimization work process, in-lining .CSS and .JS files, and why ...

    UML_Distille.pdf

    - **符号与元模型 (Notations and Meta-Models)**:解释了UML中的基本符号和元模型概念。 - **UML图表 (UML Diagrams)**:介绍了常见的UML图表类型。 - **什么是合法的UML (What Is Legal UML)?**:定义了符合UML...

    RESTful Web Services.rar

    1xx: Meta 373 2xx: Success 374 3xx: Redirection 377 4xx: Client-Side Error 380 5xx: Server-Side Error 387 C. The HTTP Header Top Infinity..... . 389 Standard Headers 390 Nonstandard Headers 404...

    TICQClient Version

    not it parses CLI_META and SRV_META packets[-] Fix in SRV_METAINTEREST, interests were badly parsed[-] Some fixes with LNTS strings26-June-2002, Version 0.1[!] First public release

    高清彩版 Bootstrap 4 Site Blueprints(2nd)

    **What is Gulp and why should you use it?** 介绍了Gulp是什么,它是一种流行的自动化构建工具,可以自动执行诸如文件合并、压缩、浏览器刷新等任务,从而提高开发效率。 **Bootstrap’s build process** 讲解了...

    ZendFramework中文文档

    9.1.2. Why Use Zend_Date? 9.2. 操作理论 9.2.1. 内部(Internals) 9.3. Basic Methods 9.3.1. The current date 9.3.2. Zend_Date by Example 9.3.2.1. Ouput a Date 9.3.2.2. Setting a Date 9.3.2.3. ...

    a project model for the FreeBSD Project.7z

    Ports is the collection of meta-data that is needed to make software packages build correctly on FreeBSD. An example of a port is the port for the web-browser Mozilla. It contains information about ...

    Digging into WordPress.pdf

    1.1.2 Why WordPress is Amazing ............................................................9 1.1.3. How to Setup and Configure WordPress .........................................10 1.1.4 How to ...

    Python Power - The Comprehensive Guide (2008).pdf

    Why Use Python? ...........................................................................................................11 Object-Oriented .............................................................

    spring-framework-reference4.1.4

    Not Using Commons Logging ................................................................... 12 Using SLF4J ..............................................................................................

Global site tag (gtag.js) - Google Analytics