php++i和i++区别

tech2023-11-02  109

php++i和i++区别

So far in this series we’ve discussed how PHP can be the perfect adjunct to an RPG-oriented business system providing the kind of high quality web pages that everyone feels they need. In the articles I’ve seen elsewhere on the web, the emphasis is always on how to connect PHP to RPG or vice versa. No one ever talks about how to create quality pages, what they should look like, how should they be structured, and so on.

到目前为止,在本系列文章中,我们已经讨论了PHP如何成为面向RPG的业务系统的完美辅助,以提供每个人都认为需要的高质量网页。 在网上其他地方看到的文章中,重点始终是如何将PHP连接到RPG,反之亦然。 没有人谈论过如何创建高质量的页面,页面的外观,如何组织等等。

The reason for that is simple: we don’t need no stinkin’ instructions for that! Everyone knows how to design good screens (opps, pages). That’s the easy part, right? Well, maybe not. We certainly don’t have to look far to find examples where that just isn’t true – pages, that if they were designed with efficiency and intuitiveness in mind, it’s hard to tell what mind they were playing to.

这样做的原因很简单:我们不需要为此而生的臭味! 每个人都知道如何设计好的屏幕(opps,页面)。 那是容易的部分,对吧? 好吧,也许不是。 当然,我们不必走远就可以找到不完全正确的示例-页面,如果这些页面在设计时考虑了效率和直观性,就很难说出他们在玩什么游戏。

Of course, business pages are different from the pages that we may develop for a blog or website. It’s not that the way a page looks isn’t important, it is, but the way input fields are organized and the efficiency with which one can go through a page and enter data is very important for business pages. That is especially true for i users; the green screen that they are used to working with is unrivaled for speed and ease for hardcore data entry. As pretty as they can be, sometimes switching users to a GUI screen results in mixed reviews.

当然,业务页面与我们为博客或网站开发的页面不同。 这并不是说页面的外观并不重要,而是输入字段的组织方式以及浏览页面和输入数据的效率对业务页面而言非常重要。 对于i用户而言尤其如此; 他们习惯使用的绿色屏幕在速度和便捷性方面都无与伦比。 尽其所能,有时将用户切换到GUI屏幕会导致评论不一。

So, in this article I’ll talk about some things worth considering if you want to create quality, well structured pages (which we all do, right?).

因此,在本文中,我将讨论一些如果您要创建质量高,结构合理的页面值得考虑的事情(我们都这样做,对吗?)。

开关数量 (Number of Switches)

For my money, the number one thing to look at in designing business pages is the number of ‘switches’, times when you switch from the keyboard to the mouse or trackpad or scroll bar and then switch back. Every time you do that, you have to move your hands and change your focus, and there is nothing that causes errors and fatigue as much as changing your mental focus. As a result, we want to strive for a minimal number of switches.

用我的钱,在设计业务页面时要考虑的第一件事是“开关”的数量,即从键盘切换到鼠标,触控板或滚动条然后再切换回去的次数。 每次这样做时,都必须动手并改变焦点,没有什么会比改变精神焦点引起更多的错误和疲劳。 因此,我们希望争取最少数量的交换机。

You’re probably saying “yeah, no kidding.” It does seem like an obvious thing. But if you look at many pages out there, limiting switches does not seem to be the number one priority. One example that comes to mind is entering dates. In the green screen world, you can just key in the date 20130130 and keep going. If you key in 20130143 then an error message pops up. But in the web world, when you have a date field you get a calendar pop up and you get to select the date you want with the mouse or trackpad. All in all, it takes about three clicks and two switches to do this, more if you want a date that is not in the current month. It completely changes the focus of your mind from looking at characters to dealing with a graphical representation. It is cool and all, especially with the new CSS3 capabilities, but efficiency, not coolness, is the goal when working with business screens.

您可能会说:“是的,不开玩笑。” 看起来确实是一件显而易见的事情。 但是,如果您查看那里的许多页面,限制开关似乎并不是第一要务。 我想到的一个例子是输入日期。 在绿屏世界中,您只需键入日期20130130并继续进行即可。 如果键入20130143,则会弹出错误消息。 但是在网络世界中,当您拥有日期字段时,会弹出一个日历,并可以使用鼠标或触控板选择所需的日期。 总而言之,这大约需要三下单击和两个开关才能完成,如果您想要的日期不在当前月份,则需要更多操作。 它完全改变了您的思维重点,从查看字符到处理图形表示。 一切都很酷,尤其是使用CSS3的新功能,但在处理商务屏幕时,目标是效率而不是冷静。

The example also illustrates how the business system environment is different from that of a more normal web page. Someone planning a vacation can really benefit from seeing dates in a calendar format. For them, the extra keystrokes pay off in terms of fewer errors, particularly errors that can’t be edited, like leaving on Wednesday instead of the Tuesday that you wanted. But in a business context I might be reading the ‘delivery date requested’ off a paper work order and don’t need to see no stinkin’ calendar. I just need a field were I can key in 20130315.

该示例还说明了业务系统环境与更普通的网页的环境有何不同。 计划假期的人可以从日历格式的日期中真正受益。 对于他们来说,额外的击键可以减少错误,尤其是无法编辑的错误,例如在星期三而不是您想要的星期二时,可以得到回报。 但是在业务环境中,我可能正在从纸质工作单上读取“要求的交货日期”,不需要看到没有臭味的日历。 我只需要填写一个字段即可输入20130315。

The enemy here is shifting focus. As much as we like to pretend, humans really aren’t all that smart. If we can concentrate on one thing at a time, like reading text and keying data into fields on a screen where the cursor moves as automatically as possible, we’re OK. It’s a one to one mapping, don’t you know. But when the entry formats start to change and get mixed, it becomes more difficult, which in turn makes us tired and more likely to make mistakes.

这里的敌人正在转移焦点。 正如我们要假装的那样,人类真的不是那么聪明。 如果我们一次可以专注于一件事,例如将文本读取和将数据键入到屏幕上的字段中,光标将自动尽可能地移动,那么就可以了。 这是一对一的映射,您不知道吗。 但是,当输入格式开始更改并变得混乱时,它将变得更加困难,这反过来又使我们感到疲劳,并且更容易犯错误。

镜像任务,而不是数据库 (Mirror The Task, Not the Database)

A long, long time ago, back when dinosaurs ruled the earth and before people lived in houses, developers would design a business screen to mimic the database that stood behind it. We would have a function that did Product Master maintenance because there was a product master file, and another one that did Product Structure maintenance because that was a file, and a third that set up routings to tell you how to make the product. The process of setting up a new product would involve three separate functions.

很久很久以前,当恐龙统治着地球并且在人们居住在房屋中之前,开发人员会设计一个业务屏幕来模仿其背后的数据库。 我们将有一个功能可以执行Product Master维护,因为有一个产品主文件,而另一个功能则可以进行Product Structure维护,因为它是一个文件,而第三个功能可以设置路由来告诉您如何制作产品。 设置新产品的过程将涉及三个单独的功能。

As time went on, people began to see that what was really important was not setting up a Product Master record, but rather setting up a product. As a result you would want to develop a function that resulted in a product being created. Yes, it updated the Product Master but it also allowed you to enter a variety of oddball fields in a number of other files that needed to tie into the Product Master in order to fully define a new product. In other words, the key thing became the business task and not the file that was being affected.

随着时间的流逝,人们开始发现真正重要的不是建立产品主记录,而是建立产品。 结果,您将需要开发一个功能以导致创建产品。 是的,它更新了产品主数据,但还允许您在其他许多文件中输入各种奇怪的字段,这些文件需要绑定到产品主数据中才能完全定义新产品。 换句话说,关键是成为业务任务,而不是受影响的文件。

This is very important today as staffs shrink and more and more people become responsible for interdisciplinary tasks. When your user has a business task to do, the last thing you want is for them to have to go to two or more functions to get this done. As technical people we are very data base oriented but you really need to dig into what the user is doing and how you can accomplish that within a single screen or function. You have to understand what data they enter, what data they need, how often they do enter or use a given piece of data, and how the various elements relate to each other.

在今天,这非常重要,因为人员不断减少,越来越多的人开始负责跨学科任务。 当您的用户有一项业务任务要做时,您要做的最后一件事就是让他们必须使用两个或多个函数才能完成此任务。 作为技术人员,我们非常注重数据库,但是您确实需要深入研究用户的操作以及如何在单个屏幕或功能内完成操作。 您必须了解他们输入的数据,他们需要的数据,他们输入或使用给定数据的频率,以及各个元素之间的相互关系。

How do you do that? Well, you can ask, but just as crime scene witnesses are often notoriously unreliable about what happened, so too are many users not very good at remembering what they really need. You have to watch them in action, speak to a variety of people, get a solid understanding of the task, what its components are, and how it relates to the company as a whole.

你是怎样做的? 好吧,您可以问,但是就像犯罪现场的证人通常对所发生的事情不可靠一样,许多用户也不太擅长记住他们真正需要的东西。 您必须观察他们的行动,与各种各样的人交谈,对任务,任务的组成部分以及与整个公司的关系有深刻的了解。

当心折叠 (Watch Out for the Fold)

Does having data appear “below the fold” really impact the likelihood of it being seen? For business systems, the question becomes whether having data appear below the fold impacts the efficiency of the screen.

数据出现在“首屏之下”真的会影响到被看到的可能性吗? 对于业务系统,问题在于是否有数据出现在折叠下方会影响屏幕的效率。

For regular websites, until a few years ago, having info below the fold was an obstacle to it being seen. Today, users are more sophisticated and understand that scrolling down is an essential part of the web experience. Business pages are a little different, of course. The user doesn’t have a choice to scroll or not to scroll, they must scroll down in order to finish their task. It becomes one more thing you have to do which shifts your focus and as such, it’s a nuisance… especially if you have to do it more than once.

对于普通的网站,直到几年前,低于首屏的信息是阻碍其被看到的障碍。 如今,用户变得越来越老练,他们了解向下滚动是Web体验的重要组成部分。 当然,业务页面有所不同。 用户没有选择滚动还是不滚动的选择,他们必须向下滚动才能完成任务。 您必须做的另一件事是转移您的注意力,因此这是令人讨厌的事情……尤其是如果您必须多次进行。

If you put the extra data on a separate page then the user still has to click a link or button to get to it. So what can we do? Unfortunately, not much. The best you can do is put the most important and frequently used data at the top of the page to minimize the probability that the user will have to scroll down.

如果将多余的数据放在单独的页面上,则用户仍然必须单击链接或按钮才能访问它。 所以,我们能做些什么? 不幸的是,数量不多。 您可以做的最好的事情就是将最重要和经常使用的数据放在页面顶部,以最大程度地减少用户向下滚动的可能性。

Most of all, you should watch the header you put at the top of the page. My bank loves to have their logo and other worthless stuff take up half the page, which means every time I check my balance or do a transfer, I need to scroll down. Think that doesn’t annoy the heck out of me?

最重要的是,您应该注意放在页面顶部的标题。 我的银行喜欢让他们的徽标和其他毫无价值的东西占据整个页面的一半,这意味着每当我检查余额或进行转帐时,我都需要向下滚动。 认为这不会惹恼我吗?

摘要 (Summary)

If you have built a web site or two, and have done a good job of it, you may be saying everything here is important for regular web sites in addition to business pages. And you’re probably right. Maybe the real difference is that a pleasant appearance can encourage users to gloss over data-oriented problems on a web site, but on a business page, everything is right out there in front of you and you have to get it right.

如果您已经建立了一个或两个网站,并且做得很好,那么您可能会说这里的所有内容除了商业页面外,对于常规网站也很重要。 你可能是对的。 也许真正的区别在于,令人愉悦的外观可以鼓励用户掩盖网站上面向数据的问题,但是在企业页面上,一切都摆在您面前,您必须正确处理。

Image via Fotolia

图片来自Fotolia

翻译自: https://www.sitepoint.com/php-and-the-i-3/

php++i和i++区别

相关资源:jdk-8u281-windows-x64.exe
最新回复(0)