architecture - What are the characteristics of a framework? -
is there reference design , implement framework? characteristics of framework? , features should be? requisites must covered? orm associated framework?
thanks
your question indeed bit vague, it's kinda interesting in terms of "coding philosophy". don't claim answer way such things, without specifics problem. it's set of guidelines i'd use , helpful you.
so, first of all, have understand what's problem trying solve. not consider "i educational purposes" option here. try asking questions these:
do need solve singular problem?
a simplistic example: if application needs sort array or, bit closer field, calculate mean or deviation - of singular problems. shouldn't include complete set of known sorting algorightms in application sort array, same way don't need deep statistical analysis system calculate mean. i'd consider developing library specific problem.
what's wrong current solution?
such generic notions frameworks born when current solution present, there way interact more efficiently. it's bad idea hide bad code or design under hood of kind of abstraction. if current solution works implementation seems problem, i'd start refactoring existing code, not rewriting scratch or hiding it.
is recurring problem?
one of valueable features of generic pieces reusability. harder build generic, yet useful. harder means expensive, have justify wasting time on building generic blocks. if don't or can't use expensive blocks in more 1 place, don't need them , better off developing concrete solution instead.
the reason marked out these questions see code developer calls framework , puts considerable amount of time , effort it, ends doing not framework , importantly, shouldn't 1 in first place.
so, got first part of question:
is there reference design , implement framework? characteristics of framework? , features should be?
it'd appropriate here give list of design guides , features exclusive frameworks, don't think it's idea. here's why: there no iso or other official or used standard software frameworks development. , that's because framework not solve particular problem, provides means so - important feature.
a common misconception frameworks must absolutely transparent , should able bend need. framework developers , users must understand framework hardwired point. , that's not because can't otherwise. can, it's called metaprogramming. reason framework implies invariable internal behaviour, called "core of framework". it'd useful client have way extend behaviour, not modify it.
point is, framework must dictate how client interacts environment. in bit more strict terms, when client operates inside framework, control flow kind of reversed: framework evaluates client's code , makes appropriate calls, framework calls client, not other way round, plain libraries. ofcourse, there might exceptions, i'm talking general idea here.
then ask:
what requisites must covered?
as figured already, there no strict requisites. there few things i'd suggest:
- framework whole should represent specific domain (field) fully, shouldn't go outside of it. means, if framework financial analysis, shouldn't weather forecast , alarm clock too
- framework should have kind of domain-specific language. , doesn't matter in form. can domain-specific objects client operates, naming convention , proper level of indirection (abstraction) or can go way , make programming language own interpreter inside of if want. it's idea of client interacting closer to, example, financial terms , operations, abstract handlers, pointers , functions
- it should obvious, it'd careless not mention it: plan on expansion , scaling when dealing generic matters. shouldn't hard (i don't easy) implement , add new long doesn't contradict planned behaviour, careful , don't step metaprogramming deep doing that
and last part of question was:
are orm associated framework?
well, yes , no. if framework depends on data storage not specific every instance, should have kind of abstraction that. , orm best way go in case, there few things i'd point out:
- there other (probably not flexible) ways abstract data storage
- orm implies operating objects (oo-language, is) not true
- problems of orm technique whole topic, believe possible "hitches" might not compatible framework in way
okay, that's questions, i'd add tips if ever decide develop proper framework:
- do not forget develop means solve, not solution itself
- do not try "solve all", meaning not forget problem solving. can't solve all, not in 1 solution anyway
- do not concentrate on or distracted unnecessary features, on
- find expert in field plan code for, might have insight needed , not
- i find convenient adopt feature-driven development process kind of job, because framework implies tons of features can make scatter effort leads failure, if approach not solid. if plan on doing alone, seeing iterative working results kind of motivating
Comments
Post a Comment