Mail Archives: geda-user/2015/02/11/07:38:38
Content preview: Hi, On 2015-02-08 02:08, DJ Delorie wrote: > PCB's source
is *ancient*. Even a simple clean-up pass would be a > large undertaking.
It's probably one of the first examples of > object-oriented programming.
[...]
Content analysis details: (-2.9 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked.
See
http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
for more information.
[URIs: wikipedia.org]
0.0 TVD_RCVD_IP Message was received from an IP address
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
X-SA-Exim-Connect-IP: 89.104.9.138
X-SA-Exim-Mail-From: kraftb AT think-open DOT at
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on think-open.at
X-Spam-Level:
X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00,
TVD_RCVD_IP,URIBL_BLOCKED autolearn=unavailable version=3.3.2
Subject: Re: [geda-user] FOSDEM
X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000)
X-SA-Exim-Scanned: Yes (on mail.think-open.at)
Hi,
On 2015-02-08 02:08, DJ Delorie wrote:
> PCB's source is *ancient*. Even a simple clean-up pass would be a
> large undertaking. It's probably one of the first examples of
> object-oriented programming.
Doing electronics is currently rather a hobby for me than my day to day
work. I usually work as a web developer working with and developing the
content management system TYPO3. I will try to put down some of my
experience in there - maybe it makes sense for PCB also:
======
The CMS was created around the beginning of the millenia and since then
got a lot of improvements. Especially during the last few years the
complete core system got refacatored and parts got reimplemented to
adhere to modern programming paradigms.
* They started with writing a bunch of units tests (units tests and
functuional tests) for every thinkable code piece creating large code
coverage.
* Then they introduced namespaces for every class (like in Java), split
code up, removed duplicated code, etc.
* Unclear sections of code got documented, design patters were
introduced (documented) where possible.
But in the meantime another group of people from the TYPO3 projcet
started to create a whole new web framework (flow) + CMS (TYPO3 Neos).
Like a second track. The framework itself was backported to TYPO3 CMS
and parts of the core now rely on it - so they are tied together.
Some people were against a complete new start, others didn't like the
old-school way how the product was created in the first place.
======
In the web-world there is a lot of common knowledge about what a
CMS/web-framework needs to do, requires to have, etc. There needs to be
a request dispatcher, a templating framework, a database abstraction, a
persistence layer, domain models for every data structure, etc.
Maybe it would be a first start of refactoring PCB to define those
requirements. If I would make a dummy-start I would create a list like:
* GUI Interface (human interface)
* Rendering engine (render the layout)
* DRC engine (enforce electrical rules)
* persistence layer (abstract data storage)
* plugin engine (i.e. for the autorouter)
* undo/redo logic
* etc.
Some time ago I started to read the famous "Design Patterns" book from
the GoF [1]. Altough I got stuck on around page 90 I found the
information very useful. The book describes most of the commonly found
design patterns of software architecture, how to implement them properly
and where they can be used.
Sadly the book focues on creating a new product rather than refactoring
and cleaning up an old one.
[1] http://en.wikipedia.org/wiki/Design_Patterns
(wow. It even has its own wiki page :)
greetings,
Bernhard
--
Wer nicht gelegentlich auch einmal kausalwidrige Dinge zu denken vermag,
wird seine Wissenschaft nie um eine neue Idee bereichern können.
Max Planck (1858-1947)
- Raw text -