Hogyan érdemes választani egy feladat lehetséges megoldásai közül?

  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes.
Category: 
Leírás

Ez egy olyan téma, amiről már megint régen készültem írni, és most újra egy drupal.hu kérdés adta a végső lökést.

A feladat:

ne csak a meglévő lehetőségek közül lehessen választani a közzétételi beállításoknál (közzétesz, címlapra helyez, kiemelt), hanem legyen egy plusz checkbox is

Ez egy nagyon egyértelmű és jól behatárolt leírás. A kulcsszó, amit a szerző is nagyon jól megfogott, a közzétételi beállítás, magyarul node options.

Honnan vannak ezek az opciók?
Ezek egy node különböző állapotai, ami lehet igaz vagy hamis. Ezek az opciók a node táblában vannak eltárolva egy-egy mezőben. Tehát a feladat akkor van teljesítve, és nem túlteljesítve, ha ezt, és csak ezt meg tudjuk valósítani.

Szerencsére nagyszerű jószág ez a drupal, ezerféleképpen meg lehet csinálni egy dolgot, és ez a feladat nagyon jó példa arra, hogy megoldás és megoldás között is van lényegi különbség. Nem mindegy ugyanis, mennyi erőforrásba kerül amit választunk.

A fórumban a következő lehetőségek merültek fel:

  • CCK - ezt ketten is írtuk
  • Flag - nekem az egyik személyes kedvencem
  • Taxonómia
  • Célmodul - ezt időközben megtaláltam: Custom Publishing Options

Drupalban baromi könnyű "overkill" módon kivitelezni dolgokat, ez természetes is, hiszen a jól bevált, egyszerűen kivitelezhető eljárások adják magukat, viszont felesleges terhet rónak a rendszerünkre, ergo sok olyan funkcionalitás "keletkezik" magától, amire semmi szükség a feladathoz.

Az ilyen overkill megoldások halmozása vezet odáig, hogy lesz egy batár nagy rendszer, ahol 1s helyett 4-5s az oldalgenerálási idő, a szolgáltató ledobja a láncot, és visítva szalad el, ha drupal oldalt akarnak nála üzemeltetni.

Menjünk végig a megoldásokon, és nézzük, minél, mivel lövünk túl a célon:

CCK

Lesz egy csomó sosem használt, feleslegesen tárolt beállítás, egy plusz mező egy egészen más táblában, megjelenítési módonként egy-egy sosem használt megjelenítés beállítás, egyéb moduloktól függően több felesleges változó, D7-ben pl két új táblát is kapunk ajándékba.

- Mikor lesz jó nekünk a cck?

  • Akkor, hogyha ezt az értéket valamilyen módon ki akarjuk íratni a nodeban.
  • Akkor, ha ki akarjuk használni a mezők súlyozásának a lehetőségét.

Flag modul

Na ez elég összetett dolog, amiért a leginkább ellenjavallt, hogy erősen a node műveletekbe épül bele a saját lekérdezéseivel, tehát akkor is terheli a nodeot, ha az adott nodenak semmi köze egyébként flaghez. A sminkrétegbe is belemászik, a viewsba, szóval mindenbe, amit egyébként sosem használnánk belőle ehhez a feladathoz.

- Mikor kell flag modul?

  • Akkor, ha ezt a státuszt pl a node szerkesztése nélkül egy szexi ajaxos widgettel kell állítani.
  • Ha rules-al kombinálva folyamatvezérlést építünk.
  • Ha például az egyik role az egyik állapotot, a másik a másikat állíthatja, pl egy editor beállíthatja "flagged"-re, de csak egy administrator állíthatja "unflaggedre"

Taxonómia

Összességében a legdrágább megoldásnak tűnik. Ez az egy érték 2 táblából érkezik ráadásul db_rewrite_sql-el, ami azt jelenti, hogy más modulok is simán fűszerezhetik lekérdezést.

Keletkezik továbbá két _publikus_ listaoldal is, márpedig igen valószínűtlen, hogy a látogatónak mutatnunk kell külön oldalt nodeokkal a lehetséges értékekről.

Lesz még tovább egy plusz szótár a maga összes sosem használt feauturével, benne két termmel, aminek az értékét nem fogják változtatni, mindezekhez saját beállítóoldalak.
A node megjelenítésébe bekerül automatikusan az érték - lehet a saját hookjainkal kiszedni.

Ezeken kívül itt van d6 régi baja, hogy x mennyiségű szótár után megbolodnul a szótár súly rendszere, önálló életet él, függetlenül attól mi van beállítva.

- Mikor kell a taxonómia?

  • Ha kell saját automatikus listaoldal a fontos nem fontos tartalmaknak.
  • Ha a lehetséges értékeket bővíteni, rendezni, módosítani kell.

Célmodul

A célmodulunk ezekhez képest éppen annyit tud, amennyire szükség van. Hozzáad egy mezőt a node táblához, biztosít egy jogosultságot, hogy melyik role szerkesztheti, és egy views integrációt, illetve beteszi magát a node formba.
Ha jól átgondoltuk, hogy tényleg nem kell több "feature", és egészen pontosan ez az, amit meg akarunk valósítani, akkor ez lesz a jó választás.


Ez a poszt igencsak ráült erre feladatra, pedig eredetileg sokkal általánosabban akartam írni az "overkill" jelenségről. Viszont maga a feladat annyira egzakt, hogy csak jóval elvontabb és általánosabb példát tudtam volna írni.

Comments

Good web site you have here..

Good web site you have here.. It's difficult to find high-quality writing like yours nowadays. I truly appreciate individuals like you! Take care!!|

Have you ever thought about

Have you ever thought about including a little bit more
than just your articles? I mean, what you say is important
and everything. However imagine if you added some
great images or video clips to give your posts more, "pop"!
Your content is excellent but with pics and clips, this website could certainly
be one of the greatest in its niche. Amazing blog!

Wow that was odd. I just

Wow that was odd. I just wrote an really long comment but after I clicked submit
my comment didn't show up. Grrrr... well I'm not writing all that over again. Anyhow, just
wanted to say superb blog!

Please let me know if you're

Please let me know if you're looking for a article author for your
site. You have some really good posts and I feel I would be a good asset.
If you ever want to take some of the load off, I'd absolutely love
to write some content for your blog in exchange for a
link back to mine. Please send me an email if interested.
Regards!

I simply could not depart

I simply could not depart your web site before suggesting that I actually enjoyed the usual information a
person supply in your visitors? Is going to be again incessantly
in order to investigate cross-check new posts

I quite like looking through

I quite like looking through an article that will make people think.

Also, thank you for allowing me to comment!

I like reading a post that

I like reading a post that will make people think.
Also, many thanks for allowing me to comment!

Hello there! This article

Hello there! This article could not be written a lot better!
Looking through this post reminds me of my previous roommate!
He continually kept preaching about this. I most definitely will forward this
post to him. Fairly certain he's going to have a great read.
Thanks for sharing!

Awesome issues here. I'm very

Awesome issues here. I'm very happy to peer your article.
Thank you a lot and I'm having a look ahead to touch you.
Will you please drop me a mail?

I'm really loving the

I'm really loving the theme/design of your weblog.
Do you ever run into any internet browser compatibility problems?
A handful of my blog audience have complained about my blog
not working correctly in Explorer but looks great in Firefox.
Do you have any advice to help fix this issue?

I loved as much as you'll

I loved as much as you'll receive carried out
right here. The sketch is tasteful, your authored material stylish.
nonetheless, you command get got an shakiness over that you wish
be delivering the following. unwell unquestionably come further formerly again since exactly the same nearly a lot often inside case you shield this
hike.

clomid tablets

clomid tablets https://clomidweb.com/

Hello there! Quick question

Hello there! Quick question that's completely off topic.

Do you know how to make your site mobile friendly?
My website looks weird when viewing from my apple iphone.
I'm trying to find a template or plugin that might be able to correct this issue.
If you have any suggestions, please share. Thanks!

Woah! I'm really loving the

Woah! I'm really loving the template/theme on this site.
It's simple, yet effective. Lots of times it's challenging to obtain that "perfect balance" between user friendliness and
look and feel. I have to admit you might have done a amazing
job with this. Additionally, the blog loads super quick in my opinion on Internet explorer.
Exceptional Blog!

Nice answers in exchange of

Nice answers in exchange of the issue with solid arguments and explaining
all on the subject of that.

It's fantastic that you are

It's fantastic that you are getting ideas from this
article as well as from our discussion made at this time.

Hello there! I know this is

Hello there! I know this is kinda off topic but
I was wondering if you knew where I could locate a captcha plugin for my
comment form? I'm using the same blog platform as yours and I'm having trouble finding one?
Thanks a lot!

Definitely consider that that

Definitely consider that that you stated. Your favorite
reason seemed to be on the internet the simplest thing to understand of.
I say to you, I certainly get irked at the same time as other folks consider
issues that they plainly do not recognize about. You controlled to hit
the nail upon the highest as well as outlined out the entire thing without having
side effect , other folks could take a signal. Will likely be again to get more.
Thank you

obviously like your web site

obviously like your web site but you need to take a look at the spelling on quite a few of your posts.
Several of them are rife with spelling issues and I in finding it very bothersome to tell the truth however I'll
surely come back again.

elsewhere single tadalafil

elsewhere single tadalafil 20mg hardly limit
cialis generic
seriously candidate cialis around coast
[url=http://cialislet.com/#cialis]cialis[/url]
fair marketing cialis prices virtually table http://cialislet.com/

cialis tadalafil 200mg

cialis tadalafil 200mg [url=http://www.buyscialisrx.com/]cialis no prescription[/url]
tadalafil 20mg soft tablets cialis coupon tadalafil
hinta tadalafil manipulado precisa de receita http://buyscialisrx.com/ quantum tadalafil 20 mg http://buyscialisrx.com

Hi, i believe that i noticed

Hi, i believe that i noticed you visited my weblog thus
i got here to go back the prefer?.I am trying to find things to improve my site!I guess its adequate
to use some of your ideas!!

I enjoy looking through a

I enjoy looking through a post that can make
men and women think. Also, thank you for allowing for me to comment!

cialis 10mg

cialis 10mg https://calis24.com/

Heya i'm for the first time

Heya i'm for the first time here. I found this board and I in finding It truly helpful & it helped me out much.
I hope to offer something back and aid others such as you helped me.

Hey there! Do you know if

Hey there! Do you know if they make any plugins to assist with SEO?
I'm trying to get my blog to rank for some targeted keywords but I'm
not seeing very good results. If you know of any please share.

Appreciate it!

Hi, all the time i used to

Hi, all the time i used to check blog posts here early in the morning,
for the reason that i enjoy to gain knowledge of more and more.

Informative article, just

Informative article, just what I needed.

Just wish to say your article

Just wish to say your article is as astounding.

The clearness in your post is just excellent and i could assume you're an expert on this subject.
Well with your permission let me to grab your RSS feed to keep up to
date with forthcoming post. Thanks a million and please keep up
the enjoyable work.

I just couldn't depart your

I just couldn't depart your web site prior to suggesting that I extremely loved the standard information an individual supply on your guests?
Is gonna be back often in order to check up on new posts

Hi, this weekend is good in

Hi, this weekend is good in favor of me, since this moment i
am reading this impressive educational article here
at my residence.

Hi! I could have sworn I've

Hi! I could have sworn I've been to this website before but after browsing through some of the post I realized it's
new to me. Anyways, I'm definitely delighted I found it and I'll
be book-marking and checking back often!

Its like you read my

Its like you read my thoughts! You seem to understand so
much approximately this, like you wrote the guide in it or something.
I think that you can do with a few % to power the message home a
bit, but other than that, that is excellent blog.
A fantastic read. I will definitely be back.

tear

tear [url=http://cialisle.com/#]cost for cialis[/url] explore buying tadalafil online original http://cialisle.com/

This paragraph is in fact a

This paragraph is in fact a fastidious one it helps new web viewers,
who are wishing in favor of blogging.

Howdy! I could have sworn

Howdy! I could have sworn I've been to this website before but after browsing through some of the post I realized it's new to
me. Anyhow, I'm definitely glad I found it and I'll be book-marking and checking back frequently!

I'm not sure exactly why but

I'm not sure exactly why but this blog is loading incredibly
slow for me. Is anyone else having this problem or is it a issue on my end?

I'll check back later on and see if the problem still exists.

I think this is one of the

I think this is one of the most significant information for me.

And i'm glad reading your article. But wanna remark on some general things, The site style
is great, the articles is really great : D. Good job, cheers

Thanks for ones marvelous

Thanks for ones marvelous posting! I genuinely enjoyed reading it, you're a great author.
I will be sure to bookmark your blog and will come back from now on. I want to encourage
yourself to continue your great posts, have a nice holiday weekend!

Hi there to every body, it's

Hi there to every body, it's my first visit of this webpage; this webpage contains remarkable and really fine material in support of readers.

excellent publish, very

excellent publish, very informative. I'm wondering why the other experts of this sector do not understand this.
You should continue your writing. I am sure, you
have a huge readers' base already!

I simply couldn't leave your

I simply couldn't leave your site prior to suggesting that I really enjoyed
the usual information an individual provide for your guests?
Is going to be back steadily to check out new posts

Hello I am so happy I found

Hello I am so happy I found your blog page, I really found you by error, while I was researching on Yahoo for something
else, Anyways I am here now and would just like to say thanks a
lot for a tremendous post and a all round interesting blog (I also
love the theme/design), I don’t have time to read through it all at the
minute but I have bookmarked it and also added your RSS feeds, so when I have
time I will be back to read a great deal more, Please do keep up the great b.

I'm gone to tell my little

I'm gone to tell my little brother, that he should also go to see this website on regular
basis to obtain updated from most recent gossip.

you're in reality a good

you're in reality a good webmaster. The website loading
velocity is amazing. It seems that you're doing any unique
trick. Also, The contents are masterwork. you've performed
a fantastic job on this topic!

I know this web page presents

I know this web page presents quality dependent content and other data,
is there any other web page which gives these information in quality?

Very good website you have

Very good website you have here but I was curious about if you knew of any forums
that cover the same topics talked about in this article? I'd really like to be
a part of group where I can get opinions from
other knowledgeable people that share the same interest.
If you have any recommendations, please let me know. Cheers!

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Internal paths in double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or relative path.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <del> <img>
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <a> <blockquote> <br> <cite> <code> <dd> <del> <div> <dl> <dt> <em> <li> <ol> <p> <span> <strong> <ul>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <bash>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <mysql>, <php>, <python>, <ruby>, <sql>. The supported tag styles are: <foo>, [foo].
  • Each email address will be obfuscated in a human readable fashion or (if JavaScript is enabled) replaced with a spamproof clickable link.