(19:25:23)*MartinReddy与所有人说:but do not expose any of the internal private details
(19:25:41)*MartinReddy与所有人说:That's essentially what a facade tries to do:
(19:25:51)*MartinReddy与所有人说:wraps a new interface around some existing code
(19:27:39)*十一月的雨与所有人说:ok, good
(19:29:31)umlchina与*MartinReddy说:Qeustion from Zhang Chunping: Any design patterns on API design besides 23 GOF patterns?
(19:31:12)*MartinReddy与所有人说:That's a good question
(19:31:42)*MartinReddy与所有人说:Some of the GOF patterns can be applied more to your implementation, rather than your interface
(19:32:08)*MartinReddy与所有人说:For example, a Facade or Proxy is clearly providing an API: a public interface
(19:32:27)*MartinReddy与所有人说:But perhaps you might want to hide your use of Singleton as an implementation detail
(19:32:39)*MartinReddy与所有人说:So some GOF patterns are more applicable to API Design that others
(19:32:56)*MartinReddy与所有人说:Also there are other patterns or idioms that can be applied to API Design
(19:33:05)*MartinReddy与所有人说:For example, the Pimpl Idiom in C++
(19:33:45)*MartinReddy与所有人说:Or Named Parameter Idom (NPI) as an alternative to functions with lots of parameters
(19:34:45)[*十一月的雨]与所有人说:great
(19:34:54)lidachun与所有人说:C++ 设计的API接口能否适用于其他语言,这样的设计更有通用性
(19:34:58)umlchina与*MartinReddy说:Tian Shengjun's question: Which type of class is better on api design, pure vitual class or entity c
(19:35:09)umlchina与*MartinReddy说:pure vitual class or entity class(what he mean may be concrete class) ?
(19:35:37)*MartinReddy与所有人说:Well, I think it depends on what you are trying to design
(19:36:01)*MartinReddy与所有人说:For example, you will use a pure virtual function to create an "interface"
(19:36:16)*MartinReddy与所有人说:(as in the Java sense of interface)
(19:36:56)*MartinReddy与所有人说:I often advocate avoiding using virtual until you know you want users to inherit
(19:37:14)*MartinReddy与所有人说:Because creating a virtual exposes a lot more of your class's internal details
(19:37:38)*MartinReddy与所有人说:There is a tension here between creating a design that is very extensible by your users
(19:37:53)*MartinReddy与所有人说:But also exposes too much internal details
(19:38:19)*MartinReddy与所有人说:I don't think there's a hard and fast rule, but I prefer to avoid exposing internal details until
(19:38:26)*MartinReddy与所有人说:absolutely necessary
(19:39:16)*MartinReddy与所有人说:(How about I write "END" when I'm done with my answers so you know when I'm done?)
(19:39:18)*MartinReddy与所有人说:END
(19:40:04)umlchina与*MartinReddy说:Thank you
(19:40:27)[*十一月的雨]与所有人说:thanks for your great ansowers
(19:40:37)*MartinReddy与所有人说:You're welcome!
(19:41:26)*MartinReddy与所有人说:There were some questions earlier about what an API is. Perhaps I could quickly address that
(19:41:53)*MartinReddy与所有人说:I see an API is simply: code that other users (or programs) have to use
(19:42:21)*MartinReddy与所有人说:An API is the abstract description of the interface:
(19:42:28)umlchina与*MartinReddy说:Li Wenjun's question: how can I get good interface, from use case specification (top to bottom) or f
(19:42:34)*MartinReddy与所有人说:i.e., the function calls, enums, types, consts etc.
(19:42:42)umlchina与*MartinReddy说:(top to bottom) or from existing classes (bottom to top)?
(19:43:01)*MartinReddy与所有人说:And these can by implemented in a library that you link into your programs
(19:44:14)*MartinReddy与所有人说:Li Wenjun: my own preference is to gather requirements from the users
(19:44:37)*MartinReddy与所有人说:and then to try to extract the key concepts - the major classes - from that information
(19:44:54)*MartinReddy与所有人说:then to work out how these major classes relate to each other
(19:45:19)*MartinReddy与所有人说:So, my preference, is to try and work out the coarse, high-level architecture first
(19:45:48)*MartinReddy与所有人说:from there you can dive down to specific classes
(19:46:11)*MartinReddy与所有人说:but only to the level that you want to - i.e., you don't have to design every class
(19:46:42)*MartinReddy与所有人说:I then prefer to add more detail in an interative (agile) approach
(19:47:00)*MartinReddy与所有人说:but I think it's important for everyone on a team to have a shared high-level architecture
(19:47:11)*MartinReddy与所有人说:in their heads before starting on an agile iteration
(19:49:38)umlchina与*MartinReddy说:Ouyang Jiexiao's question: I am interested in your experience in Pixar and Linden Lab, How were you
(19:49:51)umlchina与*MartinReddy说:Linden Lab, How were you feeling there? How are the development process in them?
(19:50:02)umlchina与[*十一月的雨]说:会的
(19:50:25)*MartinReddy与所有人说:Ouyang Jiexiao: Yes, great question. Every company I have worked in has been very different.
(19:50:44)*MartinReddy与所有人说:At Pixar, we had a very large code base that was over 25 years old
(19:51:13)*MartinReddy与所有人说:The code had devolved somewhat, so that it was difficult to make major changes
(19:51:35)*MartinReddy与所有人说:We therefore decided to build a new film-making system to replace the old one
(19:52:03)*MartinReddy与所有人说:To do this, we tried to adopt good software development processes
(19:52:27)*MartinReddy与所有人说:We had a design team (called Object Modeling) who was responsible for creating the architecture
(19:52:44)*MartinReddy与所有人说:and class designs, and communicating those to everyone
(19:53:07)*MartinReddy与所有人说:We had a large QA team because we placed a big focus on writing automated tests
(19:53:28)*MartinReddy与所有人说:We required all core (non-GUI) code to have 100% line coverage by unit tests
(19:53:53)*MartinReddy与所有人说:We also had a UI design team and documentation team to provide good user experience
(19:54:21)*MartinReddy与所有人说:In terms of engineering, we adopted some agile techniques, but we were still quite heavy processwise
(19:54:37)*MartinReddy与所有人说:For example, we developed a lot of requirements documents
(19:54:57)*MartinReddy与所有人说:In contrast, at Linden Lab, the team embraced agile a lot
(19:55:08)*MartinReddy与所有人说:At Linden, we used SCRUM
(19:55:39)*MartinReddy与所有人说:So we would collect user stories, define our backlog, prioritize and bid out our iterations
(19:55:55)*MartinReddy与所有人说:and try to stick to 2-week iterations (at Pixar, it was more like 2 months)
(19:56:24)*MartinReddy与所有人说:I learned to like SCRUM a lot - although there are things you have to be aware of when using SCRUM
(19:57:02)*MartinReddy与所有人说:I'm happy to chat more about any of those development techniques/processes if you like
(19:57:13)*MartinReddy与所有人说:END
*╆佳娱★神马说:●本期庄家【*放羊的狼】【★⑩把【游戏】:★10万━100万(远端)】:线上、线下、悄悄吃掉●不开语音者后果自负●记录【】
*╆佳娱★神马说:●本期庄家【*放羊的狼】【★⑩把【游戏】:★10万━100万(远端)】:线上、线下、悄悄吃掉●不开语音者后果自负●记录【】
*╆佳娱★神马说:●本期庄家【*放羊的狼】【★⑩把【游戏】:★10万━100万(远端)】:线上、线下、悄悄吃掉●不开语音者后果自负●记录【】
(19:58:11)umlchina与*MartinReddy说:Liu Minye's question: In our company, all developers are busy on their own project, no one would do
系统: Яεхㄒε所在的IP被管理员umlchina屏蔽了。
(19:58:41)umlchina与*MartinReddy说:no one would do more work on better API or other reusable things. How to change such situation
(19:59:04)*MartinReddy与所有人说:Liu Minye: I see this a lot
(19:59:32)*MartinReddy与所有人说:For example, when Linden Lab was a small company developers were told
(19:59:39)*MartinReddy与所有人说:to "do what you want"
(19:59:54)*MartinReddy与所有人说:this can be a good thing when you have a small team of talented engineers
(20:00:04)*MartinReddy与所有人说:you are basically saying that you trust them to make good decisions
(20:00:17)*MartinReddy与所有人说:However, over time, this can turn out to be a bad thing
(20:00:34)*MartinReddy与所有人说:For example, the Second Life client eventually became very difficult to use
(20:00:49)*MartinReddy与所有人说:with lots of options and features, some options that conflicted with each other,
(20:01:06)*MartinReddy与所有人说:We reached the point where we had to step back and look at the produt as a whole
(20:01:20)*MartinReddy与所有人说:and come up with a unified vision for how it was supposed to work
(20:01:36)*MartinReddy与所有人说:To remove features that didn't make sense or combine similar features
(20:01:54)*MartinReddy与所有人说:Unfortunately, many companies only adapt after they realize that things have gotten very bad
(20:02:16)*MartinReddy与所有人说:It can be difficult to realize ahead of time and make changes to avoid these problems
(20:02:27)*MartinReddy与所有人说:One big thing for me is communication
(20:02:49)*MartinReddy与所有人说:When a team is very small, you can just talk to the person sitting next to you
(20:03:01)*MartinReddy与所有人说:But when a team grows, the communication channels have to evolve too
(20:03:22)*MartinReddy与所有人说:This might mean more documentation or more meetings or more e-mail
(20:03:36)*MartinReddy与所有人说:None of which is very fun, but if you don't fix your communication channels
(20:03:56)*MartinReddy与所有人说:then developers don't know what everyone else is doing and you get into problems
(20:04:02)*MartinReddy与所有人说:So, to answer your question:
(20:04:28)*MartinReddy与所有人说:The management has to agree that developers should work to a unified vision
(20:04:43)*MartinReddy与所有人说:And the communication channels have to allow developers to know what else is going on
(20:04:59)*MartinReddy与所有人说:As an example, at Pixar, we held "Weeklies"
(20:05:18)*MartinReddy与所有人说:which was a meeting where the entire team (dev, QA, design, doc, etc.) go together
(20:05:28)*MartinReddy与所有人说:and engineers would demonstrate things they had been working on
(20:05:44)*MartinReddy与所有人说:this was a great way to communicate new changes and often caused people to start
(20:05:56)*MartinReddy与所有人说:talking to each other because they realized they could help each other
(20:05:58)*MartinReddy与所有人说:END
(20:06:23)*MartinReddy与所有人说:Actually, I'll say a little more... :-)
(20:06:35)*MartinReddy与所有人说:Your question was really more about taking the time to write good APIs
(20:06:44)*MartinReddy与所有人说:I don't think I answered that very well
(20:06:59)*MartinReddy与所有人说:But it's a similar issue, that companies don't see the value of good API design
(20:07:23)*MartinReddy与所有人说:until there code has devolved and become unusable, at which point it's too late
(20:07:45)*MartinReddy与所有人说:It really takes someone with experience to be able to convince management that you actually
(20:08:02)*MartinReddy与所有人说:save time in the long term by spending more time writing good APIs up front
(20:08:20)*MartinReddy与所有人说:because the maintenance costs should be reduced over time
(20:08:39)*MartinReddy与所有人说:Hopefully that's a better answer to your question Liu Minye
(20:08:40)*MartinReddy与所有人说:END
(20:11:20)*MartinReddy与所有人说:That's okay :-)
(20:11:27)*MartinReddy与所有人说:I'm happy to be here
(20:11:38)*MartinReddy与所有人说:Have a good evening!
(20:12:17)*MartinReddy与所有人说:Me too :-)
19:47:17)*MartinReddy与所有人说:END