什么是Web应用程序中的n层架构范围?(What are n-tier architecture scope in web-application?)
我发现了n-tier Web应用程序概念,如下所示:
1-数据库(包括数据库业务和表或存储过程以及所有数据库内容)
2-网络。 数据(包括实体和存储库)
3-网络。 模型(包括非实体的一些简单模型可以转移到客户端)
4-网络。 业务(在某些应用程序中被承认它不是强制性的,但它包括一些功能,例如如何计算事物)
5-网络。 服务(包括SOAP restful应用程序上的Web API)
6-网络。 安全性(它包括一些您想要的自定义安全性,但它不是强制性的)
7-网络。 客户端(包括客户端功能,如jquery,mvvm和其他一些类似身份验证,在UI中实现的证券)
8-网络。 扩展(包括额外的辅助方法和包装器对象)
9-网络。 处理程序(包括所有处理程序和模块)
这些层可以放在不同的项目上,它们可以由MVC实现,甚至可以通过asp.net实现,具有相同的概念。
我想知道我的理解是否正确? 还是有更好的主意? 你能扩展它们还是有限且足够?
请指导我们有什么标准?
I've found out n-Tier web application concept like following categories:
1- Database (including database business and table or store procedures and all database stuff)
2- Web. Data (including entities and repositories)
3- Web. Model (including not entities some simple model can transfer to client)
4- Web. Business (in some application is admitted it is not mandatory but it includes some functionality such as how to calculates things)
5- Web. Service (including web API on SOAP restful application)
6- Web. Security (it includes some custom security as you wish but it is not mandatory)
7- Web. Client (including client-side functionalities like jquery, mvvm and some other like authentication, securities implemented in UI)
8- Web. Extension (including extra helper methods and wrapper objects)
9- Web. Handler (including all handler and modules)
These layers could be placed on different projects they could be implemented by MVC or even by asp.net of course with the same concept.
I was wondering if my understanding was right or not? or got any better idea? Could you expand them more or are they limited and enough?
Please guide me what are standards about them?
原文:https://stackoverflow.com/questions/16895079
最满意答案
这是过去十天的查询。
select sysdate - (level-1) , level as day_order from dual connect by level <= 10;
你的月份查询看起来非常过分。 这将做同样的事情:
select to_char(add_months(trunc(sysdate, 'MM'), 1 - level), 'Month') , level as month_order from dual connect by level <= 7;
“假设数据在今天的日期有效,其余9天没有任何数据,但必须将计数显示为零”
在外连接中使用生成的结果集:
with q as ( select sysdate - (level-1) as dt , level as day_order from dual connect by level <= 10 ) select q.dt as txn_date , sum(t42.col1) from q left outer join t42 on t42.transaction_date = q.dt group by q.dt;
Here's a query for the last ten days.
select sysdate - (level-1) , level as day_order from dual connect by level <= 10;
Your month query seems extremely over-engineered. This would do the same thing:
select to_char(add_months(trunc(sysdate, 'MM'), 1 - level), 'Month') , level as month_order from dual connect by level <= 7;
"Let suppose if the data is available on today's date and remaining 9 date's doesn't have any data but it has to display the count as zero"
Use the generated result set in an outer join:
with q as ( select sysdate - (level-1) as dt , level as day_order from dual connect by level <= 10 ) select q.dt as txn_date , sum(t42.col1) from q left outer join t42 on t42.transaction_date = q.dt group by q.dt;
相关问答
更多-
这个表达式: to_date(SYSDATE, 'yyyy-MM-dd') 没有意义。 SYSDATE 已经是一个日期。 因此,此表达式使用系统上的任何本地设置将SYSDATE转换为字符串。 然后,它使用格式'yyyy-MM-dd'将结果转换为日期。 对于本地设置的许多值,这将失败。 如果你想要差异,那么做这样的事情: SELECT (trunc(SYSDATE) - trunc(LoginDate)) as difference FROM LOGINRECORDS WHERE LoginRecordI ...
-
性能差异很大:使用sysdate vs使用预格式化日期(Large performance difference: Using sysdate vs using pre-formatted date)[2021-12-10]
Jonathan Lewis在9i中写了关于sysdate问题; 例如,在这里看看'令人惊讶的sysdate'部分。 本质上, sysdate上的算术似乎混淆了优化器,所以在这种情况下,它认为mydate上的索引更具选择性。 这看起来像是一个非常极端的例子。 (最初从一个不真正相关的Ask Tom帖子指向这个方向)。 Jonathan Lewis has written about issues with sysdate in 9i; have a look at the 'surprising sysda ... -
你说csv文件中的日期如下: 3/10/2016 4/12/2016 3/09/2016 但在您的示例中,您尝试使用格式字符串MM-dd-yyyy解析日期 - 即。 期待一个月有前导零和-作为分隔符。 您描述的样本的正确日期格式为%M/dd/yyyy : PS C:\> [datetime]::ParseExact('3/10/2016','%M/dd/yyyy',$null) Thursday, March 10, 2016 12:00:00 AM You say that the dates ...
-
在Oracle集群中,sysdate会始终返回一致的答案吗?(In an Oracle cluster will sysdate always return a consistent answer?)[2022-05-27]
我强烈怀疑SYSDATE也是OS连接的。 要非常注意你需要使用它的原因。 如果有任何逻辑实现事件的增量跟踪(例如,您正在进行增量导出),并且您必须确保没有遗漏任何项目以及没有重复,则基于顺序ID而不是SYSDATE进行跟踪。 事实上,即使对于非集群系统也是如此,因为SYSDATE有时会发生变化(节省时间,系统管理员错误......)。 I would strongly suspect that SYSDATE is OS-linked too. Be very watchful of the reason ... -
SYSDATE的时间段(Time bracket for SYSDATE)[2022-09-09]
select * from tableName where timestamp between sysdate and sysdate - interval '5' minute 或旧式: select * from tableName where timestamp between sysdate and sysdate - 5 * 60 / 86400 select * from tableName where timestamp between sysdate and sysda ... -
TIMESTAMP和SYSDATE(TIMESTAMP and SYSDATE)[2024-02-27]
如果您需要在最近n小时内查找记录,则从当前时间中减去一个时间间隔。 对于Oracle,间隔的数量必须用单引号括起来。 您可以使用很多时间间隔(小时,分钟,秒,日,年,月)。 timestampfield > current_timestamp - interval '1' hour If you need to look for records within the last n hour, then subtract a time interval from the current time. For ... -
这是过去十天的查询。 select sysdate - (level-1) , level as day_order from dual connect by level <= 10; 你的月份查询看起来非常过分。 这将做同样的事情: select to_char(add_months(trunc(sysdate, 'MM'), 1 - level), 'Month') , level as month_order from dual connect by level ...
-
如果我正确理解你想要做什么,那么在MS Access中,语法是: SELECT * FROM reciepts WHERE Remarks = "PAID" and DATEADD("d", 30, Due_date) < date(); 养成将函数放在“常量”而不是列上的习惯会更好: SELECT * FROM reciepts WHERE Remarks = "PAID" and Due_date < DATEADD("d", -30, date()); If I understand correc ...
-
Sysdate减去2天不同(Sysdate minus 2 different days)[2022-03-04]
您可以在WHERE条件中使用CASE语句在星期一减去2或在星期的其余时间减1。 TO_CHAR(DATE,'D')提供从星期日= 1开始的星期几。因此星期一是2。 尝试这个: SELECT VERSION_NAME AS VERSION, MIN(RECONCILE_START_DT) AS DATES FROM SDE.GDBM_RECONCILE_HISTORY WHERE RECONCILE_RESULT = 'Conflicts' AND RECONCILE_S ... -
据推测,你应该像图书馆应用程序一样查询表格。 所以你需要的是像这堆条件计数: select count( case when due_date < sysdate and due_date > sysdate-7 then 1 end ) overdue_one_week , count( case when due_date <= sysdate-7 and due_date > sysdate-21 then 1 end ...