$R/(ab)\cong R/(a)\oplus R/(b)$, for $a$ and $b$ non-associate irreducible 
Let $a,b$ be non-associate irreducible elements in UFD $R$. Then 
   $$R/(ab)\cong R/(a)\oplus R/(b)$$

What is the isomorphism function I have to define?
Does $f(r+(ab))=(r+(a),r+(b))$ works here? If yes, how to show it is surjective?
I also need to understand something, Why do we need UFD?
 A: I don't think this true is without requiring that $R$ be a PID. Consider the example $R = \mathbb{Z}[X]$ and $a = 2, b = X$. Then the statement would imply $\mathbb{Z}[X]/(2X) \cong \mathbb{Z} \oplus \mathbb{F}_{2}[X]$. The latter ring has four idempotent elements, namely $(0, 0), (1, 0), (0, 1)$ and $(0, 0)$. The former ring, however, has only trivial idempotents by degree arguments (the square of any nonconstant polynomial with an odd leading coefficient also has an odd leading coefficient of higher degree). 
A: Let $R = \mathbb{C}[X,Y], a = X -1, b = X +1$.  Then $$R/(ab) = \mathbb{C}[X,Y]/(X^2-1)$$ I am pretty sure this is not isomorphic to $R/(a) \times R/(b) \cong \mathbb{C}[X] \times \mathbb{C}[Y] \cong \mathbb{C}[X,Y]/(XY)$.  
If they were isomorphic, then their prime ideal structures would have to be the same.
Let  $A  = \mathbb{C}[X]/(XY)$, $B = \mathbb{C}[X,Y]/(X^2-1)$.  These rings are both one dimensional and Noetherian.  Every Noetherian ring has only finitely many minimal prime ideals.
The minimal prime ideals of $A$ are $\mathfrak q_1 = (X)/(XY)$ and $\mathfrak q_2 = (Y)/(XY)$.  The minimal prime ideals of $B$ are $\mathfrak p_1 = (X+1)/(X^2-1)$ and $\mathfrak p_2 = (X-1)/(X^2-1)$.
For the ring $B$, every maximal ideal is of the form $(X-z_1,Y-z_2)/(X^2-1)$, where $z_1 = \pm 1$ and $z_2$ is any complex number.  Then every maximal ideal of $B$ contains exactly one of the minimal prime ideals $\mathfrak p_1, \mathfrak p_2$.
On the other hand, $(X,Y)/(XY)$ is a maximal ideal of $A$ which contains both minimal prime ideals $\mathfrak q_1, \mathfrak q_2$.  
A: Here is the proof for a PID
Let $f:R\rightarrow R/a\oplus R/b$ defined by $f(x)= [x]_a\oplus [x]_b$,
$f(ab)=0$, so $f$ induces $g:R/ab\rightarrow R/a\oplus R/b$, $a,b$ are not associated implies that the ideal generated by $a,b$ is $R$ $1=ua+vb$,  so $[ua]_b=1$ and $[vb]_a=1$ this implies that for $x,y\in R$ $g(yua+xvb)=[yua+xvb]_a+[yua+xvb]_b=[xvb]_a\oplus [yua]_b=[x]_a+[y]_b$ so $g$ is surjective.
$g(x)=0$ implies that $[x]_a=0, [x]_b=0$, $a,b$ divides $x$ hence $ab$ divides $x$ since $R$ is a UFD.
